From 5fbd488fdf56eca8e5eaa87fe93e9137e30a0d24 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Feb 2018 22:45:29 +0100 Subject: [PATCH] Only change settings for main-frame navigations --- qutebrowser/browser/webengine/webenginetab.py | 2 +- qutebrowser/browser/webkit/webkittab.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index fdabb195a..e047c9d1e 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -875,7 +875,7 @@ class WebEngineTab(browsertab.AbstractTab): @pyqtSlot(usertypes.NavigationRequest) def _on_navigation_request(self, navigation): super()._on_navigation_request(navigation) - if navigation.accepted: + if navigation.accepted and navigation.is_main_frame: webenginesettings.update_for_tab(self, navigation.url) def _connect_signals(self): diff --git a/qutebrowser/browser/webkit/webkittab.py b/qutebrowser/browser/webkit/webkittab.py index 815dbd286..73a2f2648 100644 --- a/qutebrowser/browser/webkit/webkittab.py +++ b/qutebrowser/browser/webkit/webkittab.py @@ -784,7 +784,7 @@ class WebKitTab(browsertab.AbstractTab): self.data.open_target = usertypes.ClickTarget.normal navigation.accepted = False - if navigation.navigation_type != navigation.Type.reloaded: + if navigation.is_main_frame: webkitsettings.update_for_tab(self, navigation.url) def _connect_signals(self):