diff --git a/src/ios/CDVWKInAppBrowserUIDelegate.m b/src/ios/CDVWKInAppBrowserUIDelegate.m index 4bc7a76..2f090c0 100644 --- a/src/ios/CDVWKInAppBrowserUIDelegate.m +++ b/src/ios/CDVWKInAppBrowserUIDelegate.m @@ -79,6 +79,15 @@ [[self getViewController] presentViewController:alert animated:YES completion:nil]; } +//added this code to open popup window within frame. +- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures +{ + if (!navigationAction.targetFrame.isMainFrame) { + [webView loadRequest:navigationAction.request]; + } + + return nil; +} - (void) webView:(WKWebView*)webView runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame