Skip to content

Commit 48ad2ed

Browse files
committed
WebView: open new tabs in Safari
1 parent 837f4b4 commit 48ad2ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
381381
return;
382382
}
383383

384-
// Allow loading of any http(s) and file requests:
385-
if ([@[@"http", @"https", @"file"] containsObject:newURL.scheme]) {
384+
// Allow loading of any http(s) and file requests if same frame
385+
if ([@[@"http", @"https", @"file"] containsObject:newURL.scheme] && navigationAction.sourceFrame == navigationAction.targetFrame) {
386386
decisionHandler(WKNavigationActionPolicyAllow);
387387
return;
388388
}

0 commit comments

Comments
 (0)