Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links open in Chrome on Android instead of WebView, on RN 0.56 #265

Open
fungilation opened this issue Jun 30, 2018 · 3 comments
Open

Links open in Chrome on Android instead of WebView, on RN 0.56 #265

fungilation opened this issue Jun 30, 2018 · 3 comments

Comments

@fungilation
Copy link
Contributor

fungilation commented Jun 30, 2018

Took me a long while to figure this out, here's the workaround:

<WebViewBridge
...
  originWhitelist={["http://.*", "https://.*"]}
/>

Without this, on RN 0.56 on Android, links would default open by Android in Chrome instead of the app's WebView. originWhitelist is new to RN 0.56, and react-native-webview-bridge lacks the default supplied in JS to the Native WebView. So originWhitelist needs to be supplied in userland, or it can be added in react-native-webview-bridge similar to this PR in RN: facebook/react-native@23f8f7a

@simonso-nzme
Copy link

Thanks for that! You've saved me lots of time 👍

@ghost
Copy link

ghost commented Nov 16, 2018

我加了怎么没作用

@dakiesse
Copy link

Thank you! You saved my time as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants