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: ...@@ -368,9 +368,8 @@ class WebViewNavigation:
decision.use() decision.use()
return False return False
elif decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION: elif decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION:
self.new_page(navigation_uri, LoadingType.FOREGROUND) decision.use()
decision.ignore() return False
return True
elif App().phishing.is_phishing(navigation_uri): elif App().phishing.is_phishing(navigation_uri):
self._show_phishing_error(navigation_uri) self._show_phishing_error(navigation_uri)
decision.ignore() decision.ignore()
...@@ -382,13 +381,8 @@ class WebViewNavigation: ...@@ -382,13 +381,8 @@ class WebViewNavigation:
return False return False
elif mouse_button == 1: elif mouse_button == 1:
if decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION: if decision_type == WebKit2.PolicyDecisionType.NEW_WINDOW_ACTION:
if self._window.modifiers == Gdk.KEY_Shift_L: decision.use()
loading_type = LoadingType.POPOVER return False
else:
loading_type = LoadingType.FOREGROUND
self.new_page(navigation_uri, loading_type)
decision.ignore()
return True
elif self._window.modifiers == Gdk.KEY_Control_L: elif self._window.modifiers == Gdk.KEY_Control_L:
self.new_page(navigation_uri, LoadingType.BACKGROUND) self.new_page(navigation_uri, LoadingType.BACKGROUND)
decision.ignore() 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