You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2017/02/26 00:18:50 UTC
cordova-plugin-wkwebview-engine git commit: CB-12497 - location.href
links are silently disallowed
Repository: cordova-plugin-wkwebview-engine
Updated Branches:
refs/heads/master 0af877e5e -> 8755a6991
CB-12497 - location.href links are silently disallowed
This closes #32
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/commit/8755a699
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/tree/8755a699
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/diff/8755a699
Branch: refs/heads/master
Commit: 8755a699187c7fc2203c98fcc4fa78b89f1c513e
Parents: 0af877e
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Wed Feb 22 17:38:01 2017 -0800
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Sat Feb 25 16:18:19 2017 -0800
----------------------------------------------------------------------
src/ios/CDVWKWebViewEngine.m | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/blob/8755a699/src/ios/CDVWKWebViewEngine.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVWKWebViewEngine.m b/src/ios/CDVWKWebViewEngine.m
index 4859248..e9ff246 100644
--- a/src/ios/CDVWKWebViewEngine.m
+++ b/src/ios/CDVWKWebViewEngine.m
@@ -428,7 +428,12 @@ static void * KVOContext = &KVOContext;
SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:");
if ([plugin respondsToSelector:selector]) {
anyPluginsResponded = YES;
- shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, navigationAction.request, navigationAction.navigationType));
+ // https://issues.apache.org/jira/browse/CB-12497
+ int navType = (int)navigationAction.navigationType;
+ if (WKNavigationTypeOther == navigationAction.navigationType) {
+ navType = (int)UIWebViewNavigationTypeOther;
+ }
+ shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, navigationAction.request, navType));
if (!shouldAllowRequest) {
break;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org