Scroll position of ScrollView jumps to WebView when pressed
Bug description: When pressing a WebView inside a scrollable ScrollView, the scroll position jumps down to the WebView.
To Reproduce:
- Install React Native version 0.71.3 and React Native webview Version 11.25.0
- Place webview inside ScrollView.
The first time you press, it will jump down slightly.
Expected behavior: When clicking a WebView inside a ScrollView, it should not change the scroll position of the parent ScrollView.
Environment:
- OS: Android
- OS version: >11
- react-native version: 0.71.3
- react-native-webview version: 11.25.0
Same issue here
I have the same issue. It was also reported here: #2360 #2057 I also reported this issue in another repo ( here: https://github.com/iou90/react-native-autoheight-webview/issues/259 ) but it seems to be a problem with WebView
Bug description: Content jumps to top on first time press/click
To Reproduce:
To test on real device
- Open the screen
- Press the webview content
Source (static HTML or url): https://snack.expo.dev/@sanduluca/webview-content-jump-on-press
- Scan qr code and open app on a real android device
- Press any area below first white section To reproduce start from 1
Expected behavior: No jump when press webview content
Screenshots/Videos:
https://github.com/iou90/react-native-autoheight-webview/assets/56228534/6155f52b-e469-4eaf-a105-fe863665b3b5
Environment:
- OS: Android
- OS version: 12
- react-native version: 0.71.7
- react-native-webview version: ^12.0.2
- react-native-autoheight-webview version: ^1.6.5
It looks like the auto-scrolling is a behavior of the React Native ScrollView.
The only thing I imagine could be done from the react-native-webview side would be to set focusable to false... but I think that only makes sense if your WebView content is completely noninteractive? If that is your scenario, you could try hacking/patching in that change to see if it helps.
It looks like the auto-scrolling is a behavior of the React Native ScrollView.
The only thing I imagine could be done from the
react-native-webviewside would be to setfocusabletofalse... but I think that only makes sense if your WebView content is completely noninteractive? If that is your scenario, you could try hacking/patching in that change to see if it helps.
The focusable={false} on <WebView /> doesn't seem to help with content jump. Tried on the snack I provided above.
focusable={false} on <WebView /> doesn't seem to help with content jump
I'm not sure the focusable property is actually hooked up (in fact I wonder if it's a mistake that WebViewSharedProps extends ViewProps...). I think this would require changing the native Android code.
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
Sadly we are still searching for solutions
same issue here
Same issue here in IOS in version 13.6.2
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
We are still looking for solutions
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
We are sadly still experiencing this :/
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
This sadly still happens :/
This sadly still happen with me too :/