react-native-gesture-handler
react-native-gesture-handler copied to clipboard
Single tap not processed on time
Description
For a multi-gesture setup, the single-tap finalization is delayed until all touches are released. It wouldn't be a problem unless we are talking about touches outside the tracked area, which should be otherwise ignored.
In its simplest setup, we can have a list with a ScrollView and a double & single tap combination. Now when the scroll view has an active touch, any additional touches to the tracked area only process the double-tap gesture. Single-tap is only finalized once the initial touch over the list is released. Even worse - when operating with one touch point only, single-tap finalization is delayed until the scroll`s momentum movement is completed.
I've tested 0.78 and 0.75.4 RN versions, both new & old architecture, with and without react-native-reanimated. Tried to work it out by using RNGH ScrollView and simultaneous gestures, but it didn't make a difference.
Feels like it's a native iOS issue with gesture recognition. Works fine on Android under all scenarios.
Steps to reproduce
- Scroll the list outside a
GestureDetectorwith enough momentum - Single-tap within the
GestureDetectorarea -onBeginwill be called - Observe that
onEnd/onFinalizewon't be called until scroll`s momentum completes
- Press and hold on a list outside a
GestureDetectorto initiate scrolling - Single-tap (second touch-point) within the
GestureDetectorarea -onBeginwill be called - Observe that
onEnd/onFinalizewon't be called until first touch over the scroll is released.
Expected outcome for both scenarios: - process gesture and call onEnd/onFinalize immediately after touch release within the gesture tracking area.
Snack or a link to a repository
https://snack.expo.dev/N82elUTphW1w7DR5Kp3K6
Gesture Handler version
2.18.1+
React Native version
0.75+
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes