From 45276dd3043f04b156212ce635e3b0e049fd188e Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 1 Oct 2024 15:04:29 +0300 Subject: [PATCH] update page on history navigation without memory record --- src/browser/main/tab/page.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/browser/main/tab/page.rs b/src/browser/main/tab/page.rs index a6ba9d91..2ca04791 100644 --- a/src/browser/main/tab/page.rs +++ b/src/browser/main/tab/page.rs @@ -132,19 +132,26 @@ impl Page { pub fn navigation_base(&self) { if let Some(url) = self.navigation.base_url() { + // Update with history record self.action_page_open.activate(Some(&url.to_variant())); } } pub fn navigation_history_back(&self) { - if let Some(url) = self.navigation.history_back(true) { - self.action_page_open.activate(Some(&url.to_variant())); + if let Some(request) = self.navigation.history_back(true) { + // Update without history record + self.navigation.set_request_text( + &request, true, // activate (page reload) + ); } } pub fn navigation_history_forward(&self) { - if let Some(url) = self.navigation.history_forward(true) { - self.action_page_open.activate(Some(&url.to_variant())); + if let Some(request) = self.navigation.history_forward(true) { + // Update without history record + self.navigation.set_request_text( + &request, true, // activate (page reload) + ); } }