diff --git a/src/Entity/Tab/Page.php b/src/Entity/Tab/Page.php index e9195b9..94624b6 100644 --- a/src/Entity/Tab/Page.php +++ b/src/Entity/Tab/Page.php @@ -322,6 +322,12 @@ class Page $url ); + // Ignore history record on same URL given + if ($url == $this->history->getCurrent()) + { + $history = false; + } + // Update address field by requested $this->address->set_text( $url diff --git a/src/Model/History.php b/src/Model/History.php index 585b88c..b14e515 100644 --- a/src/Model/History.php +++ b/src/Model/History.php @@ -37,6 +37,13 @@ class History return isset($this->_record[$position]) ? $this->_record[$position] : null; } + public function getCurrent(): ?string + { + return $this->get( + $this->_position + ); + } + public function getBack(): ?string { return $this->get(