react-native-gesture-handler
react-native-gesture-handler copied to clipboard
can not make both parent and children could be response to press event
make sure both parent and children could be response to press event
<TapGestureHandler
onHandlerStateChange={({ nativeEvent }) => {
// where I can record user press rect area data like position of container, do other specific logics
}}
>
<View>
// where I put my normal components here, surely it may contains TouchableOpacity elements
{this.props.children}
</View>
</TapGestureHandler>
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Description, Platforms, Steps To Reproduce, Snack or minimal code example and Package versions sections.
Hi! If this happened on iOS, you can try adding extraButtonProps={{ exclusive: false }}
to the TouchableOpacity
and/or cancelsTouchesInView={false}
(added in Gesture Handler 2.4.0) to the `TapGestureHandler.
If it happened on Android or the above doesn't help, could you prepare a simple example reproducing the issue?
Hi! If this happened on iOS, you can try adding
extraButtonProps={{ exclusive: false }}
to theTouchableOpacity
and/orcancelsTouchesInView={false}
(added in Gesture Handler 2.4.0) to the `TapGestureHandler.If it happened on Android or the above doesn't help, could you prepare a simple example reproducing the issue?
it happens at version 1.5.3
In that case I would recommend upgrading to a newer version, as there is a possibility that it is already fixed.