Can't navigate in React Native Webview if using local html file #27381
Labels
Bug
Component: WebView
Related to the WebView component.
Resolution: Locked
This issue was locked by the bot.
I followed this answer to open my
index.htm
l file insidewebview
. It successfully opens andjs
is working as well.But now the problem for me is that whenever I click on a link inside this
index.html
file to go to anotherhtml
file for example<a href="./html/create_login.html">Go to main app</a>
then it is trying to open thathtml
file in PDF instead of opening it in webview.My file structure inside the assets folder is;
React Native version:
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) M-5Y10c CPU @ 0.80GHz
Memory: 733.90 MB / 3.92 GB
Binaries:
Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5977832
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Steps To Reproduce
android\app\src\main
<WebView source={{uri: 'file:///android_asset/index.html'}} />
index.html
file it will try to open Html file referred inside the link in PDF instead of webviewReference:
#16133 (comment)
The text was updated successfully, but these errors were encountered: