[Android] Text onPress triggers parent Touchable onPress #3159
Labels
Platform: Android
This issue is specific to Android
Repro provided
A reproduction with a snack or repo is provided
Description
When a
Text
withonPress
is a child of anyTouchable
(Opacity, Highlight, WithoutFeedback), when tapping on theText
theonPress
of theTouchable
parent is also triggered.*Only seen on Android
Note: On iOS only the parent
Touchable#onPress
is triggered, but if theText
is wrapped inNativeViewGestureHandler
-> only theText#onPress
is calledSteps to reproduce
Current behavior:
Counter is incremented by 2
Expected behaviour:
Counter is incremented by 1
Preview:
Note: Not sure what runtime snacks use, but also tested with
react-native-gesture-handler@2.16.2
,react-native@0.74.1
, Hermes on a real deviceSnack or a link to a repository
https://snack.expo.dev/@dragoncodes/rngh-multi-onpress-repro?platform=android
Gesture Handler version
2.16.2
React Native version
0.74.1
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
Real device
Device model
Samsung Galaxy Fold 4
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: