From bdabcb6f5635147d4bdd4f2f4fd69e5afd8b69e9 Mon Sep 17 00:00:00 2001 From: Dave Alden Date: Mon, 11 Feb 2019 21:51:56 +0000 Subject: [PATCH] (iOS) Fix iframes in iOS/WKWebView which were broken by #418. Fixes #424. --- src/ios/CDVWKInAppBrowser.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m index 7deb6d01e..6364f4f12 100644 --- a/src/ios/CDVWKInAppBrowser.m +++ b/src/ios/CDVWKInAppBrowser.m @@ -573,9 +573,9 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig } if(shouldStart){ - // Fix GH-417: Handle non-default target attribute - // Based on https://stackoverflow.com/a/25853806/777265 - if (!navigationAction.targetFrame.isMainFrame){ + // Fix GH-417 & GH-424: Handle non-default target attribute + // Based on https://stackoverflow.com/a/25713070/777265 + if (!navigationAction.targetFrame){ [theWebView loadRequest:navigationAction.request]; decisionHandler(WKNavigationActionPolicyCancel); }else{