Update CDVWKInAppBrowserUIDelegate.m

This commit is contained in:
ShrivallabhDeshmukh 2020-04-24 10:38:33 +05:30
parent cbe345689b
commit 96b3b679f2

View File

@ -79,6 +79,15 @@
[[self getViewController] presentViewController:alert animated:YES completion:nil]; [[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 - (void) webView:(WKWebView*)webView runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt
defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame