GH-417: Handle non-default target attribute values (e.g. target=on links in WKWebView implementation on iOS (#418)
This commit is contained in:
parent
6db2f2d324
commit
9f4b72982a
@ -573,7 +573,14 @@ static CDVWKInAppBrowser* instance = nil;
|
||||
}
|
||||
|
||||
if(shouldStart){
|
||||
// Fix GH-417: Handle non-default target attribute
|
||||
// Based on https://stackoverflow.com/a/25853806/777265
|
||||
if (!navigationAction.targetFrame.isMainFrame){
|
||||
[theWebView loadRequest:navigationAction.request];
|
||||
decisionHandler(WKNavigationActionPolicyCancel);
|
||||
}else{
|
||||
decisionHandler(WKNavigationActionPolicyAllow);
|
||||
}
|
||||
}else{
|
||||
decisionHandler(WKNavigationActionPolicyCancel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user