onPress action on Pressable component inside another triggers both actions #3282
Labels
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snack or repo is provided
Description
Hello,
I have some
Pressable
components inside another, and when I click on child one, it's triggered parent onPress action.It occurs on real and simulator devices on Android and iOS.
Switch with
Pressable
component fromreact-native
and the childonPress
action doesn't trigger the parentonPress
action.I tried others pressable components like
TouchableOpacity
and here the results when I click on child pressable component:TouchableHighlight
inTouchableOpacity
-> both trigeredTouchableOpacity
inTouchableHighlight
-> parent action trigeredTouchableOpacity
inTouchableOpacity
-> child action trigeredTouchableHighlight
inTouchableHighlight
-> child action trigeredPressable
inTouchableHighlight
-> child action trigeredPressable
inTouchableOpacity
-> both trigeredPressable
inPressable
-> both trigeredTouchableHighlight
inPressable
-> both trigeredTouchableOpacity
inPressable
-> parent action trigeredTextInput
inPressable
-> parent action trigered (only on Android)Steps to reproduce
Snack or a link to a repository
https://github.com/TomCorvus/RNavigation
Gesture Handler version
2.21.2
React Native version
0.76.3
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
Pixel 7 Pro, iPhone 16 Pro
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: