Open rjritik1137 opened 3 months ago
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.74.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
Just to clarify, did you position the ScrollView with absolute inside the parent? If so, I had the same issue.
I fixed it by using the ScrollView from react-native-gesture-handler. It worked perfectly in my case. You might want to try that approach.
I'm using React Native version "react-native": "0.72.4".
@Hwirin-Kim Yes, it's inside absolute. But It doesn't matter if the scrollview is inside an absolute view or a normal view. The issue is, if Clickable elements are being positioned outside of the parent container. They are responding. But's it's not the same with ScrollView. I will try probably ScrollView from react-native-gesture-handler, but before that I would want to know why it's happening.
Perhaps Android does not support touchment on overflow content. In this commit, rn add touchment support on overflow view, the touch event will be dispatch to js code on overflow content, so those touchable will receive it and act correctly. The ScrollView also will receive the touch movement event in JS side, you can catch it in onTouchMove callback, but it won't scroll because the Motion Event is not dispatched to the actual Android ScrollView.
@alpenmilch Isn't that unexpected behaviour? If the scrollView is visible outside the parent with overflow property. The developer/user would expect it to scroll.
Description
If we have a parent view, and render Touch like elements, (for eg. - Button, Pressable, TouchableOpacity) outside the Parent View with overflow:'visible' the Touch works fine. But if I render a ScrollView outside the parent view, it doesn't scroll.
Steps to reproduce
https://snack.expo.dev/@rtk_jain/scrollview-does-not-work-when-overflowing
React Native Version
0.74.3
Affected Platforms
Runtime - Android, Runtime - iOS, Runtime - Web
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@rtk_jain/scrollview-does-not-work-when-overflowing
Screenshots and Videos
No response