Pressable onPress fires when scrolling FlatList #48488
Labels
Component: FlatList
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Needs: Author Feedback
Description
When you have a list of
<Pressable>
inside a<FlatList>
, and the list is short enough to fully fit on the screen (so that no scrolling is actually needed), then if you do scroll the list a whole bunch ofonPress
events will fire on the Pressable list items.The expected behavior is that
onPress
should only be triggered when actually pressing an item.I initially filed this report on the FlashList repo, but after further testing I actually believe this is a React Native issue.
Here's the FlashList issue: Shopify/flash-list#1461
Here's an older very similar React Native issue that's been closed without a fix: #27355
Steps to reproduce
See the linked FlashList issue for the code and steps needed to reproduce
React Native Version
0.76.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/Tobbe/expo-bun-flash-list-issue
Screenshots and Videos
Screen.Recording.2025-01-03.at.23.14.22.mov
The text was updated successfully, but these errors were encountered: