[geary/wip/728002-webkit2: 50/96] Fix links not being opened when link target is a new window.



commit b9269a627e54fc6820ea428c6bc83e645c426b20
Author: Michael James Gratton <mike vee net>
Date:   Fri Dec 2 18:58:58 2016 +1100

    Fix links not being opened when link target is a new window.
    
    * src/client/components/client-web-view.vala
      (ClientWebView::on_decide_policy): Handle new window policy as well as
      nav actions.

 src/client/components/client-web-view.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 4d78075..08e6cdc 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -366,7 +366,8 @@ public class ClientWebView : WebKit.WebView {
     private bool on_decide_policy(WebKit.WebView view,
                                   WebKit.PolicyDecision policy,
                                   WebKit.PolicyDecisionType type) {
-        if (type == WebKit.PolicyDecisionType.NAVIGATION_ACTION) {
+        if (type == WebKit.PolicyDecisionType.NAVIGATION_ACTION ||
+            type == WebKit.PolicyDecisionType.NEW_WINDOW_ACTION) {
             WebKit.NavigationPolicyDecision nav_policy =
                 (WebKit.NavigationPolicyDecision) policy;
             switch (nav_policy.get_navigation_type()) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]