[gnome-shell] portalHelper: Fix portals which require a new window to be loaded
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] portalHelper: Fix portals which require a new window to be loaded
- Date: Thu, 6 Apr 2017 10:29:08 +0000 (UTC)
commit 8369dc6b6421db577bdefb23c96f1750998ef488
Author: Catalin Iacob <iacobcatalin gmail com>
Date: Fri Mar 24 18:57:29 2017 +0100
portalHelper: Fix portals which require a new window to be loaded
https://bugzilla.gnome.org/show_bug.cgi?id=759044
js/portalHelper/main.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js
index 2928c76..b721f6a 100644
--- a/js/portalHelper/main.js
+++ b/js/portalHelper/main.js
@@ -215,6 +215,18 @@ const PortalWindow = new Lang.Class({
_onDecidePolicy: function(view, decision, type) {
if (type == WebKit.PolicyDecisionType.NEW_WINDOW_ACTION) {
+ let navigationAction = decision.get_navigation_action();
+ if (navigationAction.is_user_gesture()) {
+ // Even though the portal asks for a new window,
+ // perform the navigation in the current one. Some
+ // portals open a window as their last login step and
+ // ignoring that window causes them to not let the
+ // user go through. We don't risk popups taking over
+ // the page because we check that the navigation is
+ // user initiated.
+ this._webView.load_request(navigationAction.get_request());
+ }
+
decision.ignore();
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]