WebView inside ScrollView problem
See original GitHub issueBug description: We are using a WebView inside a ScrollView to display other RN components above or below the WebView. This worked perfectly fine before upgrading from RN 0.59.10 to 0.60.5 and above. Now we’re facing an annoying bug (on Android, iOS works fine) where the ScrollView automatically scrolls to the WebView’s position when tapping the WebView (see video). That behaviour only occurs for the first tap after the initial rendering.
To Reproduce:
return (
<ScrollView>
<Text style={{ fontSize: 20 }}>Native Component</Text>
<Text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</Text>
<Text style={{ fontSize: 20 }}>WebView</Text>
<WebView style={{ height: 1000 }} source={{ uri: 'https://www.lipsum.com/' }} />
</ScrollView>
);
Expected behavior: The ScrollView should not scroll to the WebView’s position. It should keep it scroll position.
Screenshots/Videos:
Environment:
- OS: Android
- OS version: 9
- react-native version: 0.61.2
- react-native-webview version: 7.4.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:16
Top Results From Across the Web
Android WebView inside ScrollView scrolls only scrollview
In my app I have a ScrollView that contains some linearviews, some textviews and One Webview, then other linear layouts etc. The problem...
Read more >React Native: Why Your WebView Disappears inside a ...
Placing a WebView inside a Scrollview can be problematic. The problem you would immediately come across is the WebView mysteriously disappearing.
Read more >WebView inside ScrollView not working · Issue #4773 - GitHub
I noticed that, on version 0.16.0, putting a WebView inside a ScrollView results in a blank page, no error is thrown.
Read more >WebView inside ScrollView not scrolling. - Microsoft Q&A
WebView inside ScrollView not scrolling. Hi,. I have below code and it does not work for me. The WebView is just not scrolling...
Read more >WebView inside scroll view drawing issue. [219274495]
If i have WebView inside of ScrollView (or NestedScrollView) WebView loads twitter embed with video -> is causes driving issues:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
I am getting this error. Invariant Violation: View config not found for name RNCWebView.] if anyone knows solution please share