CRAlpha / react-native-wkwebview

WKWebview Component for React Native
MIT License
642 stars 271 forks source link

Opening pop ups in wkwebview #110

Open Hashan1100 opened 6 years ago

Hashan1100 commented 6 years ago

Hi,

I tried to use to wkwebview to display a web page which contains pop up window. But it didn't display the pop up window. Then after some searching around I found this line to be added to the RCTWKWebView.m file.

config.preferences.javaScriptCanOpenWindowsAutomatically = YES;

After this line is added pop up window with web page opens in safari browser once you open the the wkwebview. The page is displaying in the browser rather than the wkwebview. How can I use this wkwebview to display the pop up window without the browser.

insraq commented 6 years ago

A prop can be added and mapped to this config. If you can submit a PR, I'd be happy to merge it.