-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
onPress not triggered while scrolling over a FlatList #23727
Comments
Snack Repro: https://snack.expo.io/@jkcooper/rn23727-scrollview-touchableopacity |
@CatapultJesse You are rendering |
I can replicate the issue on iOS in the snack, but you said in the description that Android is working correctly which I can't replicate with the same code in the snack. |
I think you shouldn't be setting onStartShouldSetResponder on every view and it might be a cause of the issue, please see https://facebook.github.io/react-native/docs/gesture-responder-system. |
I change from rn's default TouchableOpacity to "TouchableOpacity" by react-native-gesture-handler. |
I use it ,but element in TouchableOpacity dont show now,the element is absolute position |
plesae,have you resolve it now ? |
Same issue. TouchableOpacity inside a FlatList doesn't trigger onPress event when user is scrolling. Any updates? |
I can confirm that using TouchableOpacity and FlatList from the react-native-gesture-handler - works exactly as I expected. The bug still occurs using components from the RN components, with and without the |
any updates regarding this issue? |
|
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
I'm still strangling with this issue |
I have this same issue. The TouchableOpacity belongs to a separate view (from the scrolling Flatlist). In fact, none of my other custom events fire while I am scrolling through the Flatlist. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
🐛 Bug Report
In IOS if we try to render
TouchableOpacity
andFlatList
inside theScrollView
theonPress
handler fromTouchableOpacity
in not triggered when theFlatList
is scrolling.On Android, it's working correctly, so I'm, wondering if it's standard IOS behaviour or just a bug.
Similar issue #17626
To Reproduce
Try to render
TouchableOpacity
andFlatList
inside theScrollView
. When theFlatList
is scrolling thenonPress
is not triggered untilFlatList
stops scrolling.Expected Behavior
onPress
event should be triggered as on Android device.Code Example
https://gist.github.com/czystyl/fa3ea7acd58bb6dd62725f5fed0c2407
Environment
The text was updated successfully, but these errors were encountered: