Only change settings for main-frame navigations

This commit is contained in:
Florian Bruhin 2018-02-20 22:45:29 +01:00
parent 18848315f5
commit 5fbd488fdf
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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):