Closed WoLewicki closed 4 months ago
@WoLewicki thanks for producing this minimal reproduction. Should we update the reproducer to use RN 0.74.0-rc.9 rather than 0.73.6 and see if it's still reproducible?
this is also reproducible in 0.74.0-rc.9: https://github.com/roryabraham/reproducer-react-native-scrollview-tap/tree/%40wolewicki/flatlist-inverted
Thanks @WoLewicki and @roryabraham for providing a reproducer and verifying against 0.74.0
This is (sadly) as known issue. The root cause is that for inverted flatlist we use a transform which is sometimes causing problems with measurements on Fabric (resulting in missed clicks). I remember discussing this with a lot of folks (@sammy-SC @javache @kmagiera @tomekzaw et. al.)
We were already aware of this issue and it's higher up on our agenda to fix. We'll update more on this issue as we have actionable next steps.
@kosmydel has just found a potential fix for the problem, he'll link the PR here when he makes one 🚀
Hey, here is a potential fix for this issue.
PR is merged. https://github.com/facebook/react-native/commit/3753b7a0e78f8820e5f5150dd9bdf1b53145a7bd
Thanks everyone for your contribution 🥳
Description
On new arch, when FlatList is inverted, after scrolling the elements don't fire their
onPress
since the information about their position must be calculated wrongly. There is probably a bug with this method: https://github.com/facebook/react-native/blob/ddc9bd1ff351f3259b7d90dcde7babcedbf2c155/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp#L69 when we invert theFlatList
.Steps to reproduce
React Native Version
0.73.6
Affected Platforms
Runtime - Android Runtime - iOS
Areas
Fabric - The New Renderer
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/WoLewicki/reproducer-react-native/tree/%40wolewicki/flatlist-inverted
Screenshots and Videos
No response