react-native-gesture-handler
react-native-gesture-handler copied to clipboard
[Fabric, iOS] Gesture not detected when returning back to screen when `detachInactiveScreens` is set to `false`
Description
Gesture handler, similarly to reanimated, doesn't work properly when detachInactiveScreens is set to false on the navigator (tested on bottom tabs, likely other navigators, like stack, are affected as well).
This is the Fabric iOS-only bug.
[!IMPORTANT]
This issue happens only whenreact-native-reanimatedis installed in the project, so either something is wrong in Reanimated or with the integration of GH and Reanimated.
I think that this issue report under my package is related: https://github.com/MatiPl01/react-native-sortables/issues/349
This issue no longer happens when I disable react-native-screens integration via: enableScreens(false);
https://github.com/user-attachments/assets/7b2cbd46-813b-4564-8372-0007ee22c93d
Steps to reproduce
- Copy code from the attached expo snack and run it on the New Architecture on iOS
- Press on boxes on the
Screen 1to see that they recognize touches properly - Navigate to the
Screen 2and observe the same behavior - Navigate back to the
Screen 1and see that no more touches are recognized - Navigate to the
Screen 2and observe the same behavior
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
https://snack.expo.dev/@matipl01/gesture-handler-not-working-after-screen-change?platform=ios
Gesture Handler version
2.26.0 (and older)
React Native version
0.80.0 (and older)
Platforms
iOS
JavaScript runtime
Hermes
Workflow
None
Architecture
New Architecture (Fabric)
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes