Commit 0f9bc79c authored by Cédric Bellegarde's avatar Cédric Bellegarde

We can't do decision.ignore() because it will break some sites

parent f08c17a8
Pipeline #51599 passed with stage
in 10 minutes and 11 seconds
......@@ -368,9 +368,8 @@ class WebViewNavigation:
decision.use()
return False
elif decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION:
self.new_page(navigation_uri, LoadingType.FOREGROUND)
decision.ignore()
return True
decision.use()
return False
elif App().phishing.is_phishing(navigation_uri):
self._show_phishing_error(navigation_uri)
decision.ignore()
......@@ -382,13 +381,8 @@ class WebViewNavigation:
return False
elif mouse_button == 1:
if decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION:
if self._window.modifiers == Gdk.KEY_Shift_L:
loading_type = LoadingType.POPOVER
else:
loading_type = LoadingType.FOREGROUND
self.new_page(navigation_uri, loading_type)
decision.ignore()
return True
decision.use()
return False
elif self._window.modifiers == Gdk.KEY_Control_L:
self.new_page(navigation_uri, LoadingType.BACKGROUND)
decision.ignore()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment