We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db2f2d commit 9f4b729Copy full SHA for 9f4b729
src/ios/CDVWKInAppBrowser.m
@@ -573,7 +573,14 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig
573
}
574
575
if(shouldStart){
576
- decisionHandler(WKNavigationActionPolicyAllow);
+ // Fix GH-417: Handle non-default target attribute
577
+ // Based on https://stackoverflow.com/a/25853806/777265
578
+ if (!navigationAction.targetFrame.isMainFrame){
579
+ [theWebView loadRequest:navigationAction.request];
580
+ decisionHandler(WKNavigationActionPolicyCancel);
581
+ }else{
582
+ decisionHandler(WKNavigationActionPolicyAllow);
583
+ }
584
}else{
585
decisionHandler(WKNavigationActionPolicyCancel);
586
0 commit comments