react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

can not make both parent and children could be response to press event

Open zhuliminl opened this issue 2 years ago • 4 comments

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>

zhuliminl avatar May 28 '22 12:05 zhuliminl

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.

github-actions[bot] avatar May 28 '22 12:05 github-actions[bot]

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?

j-piasecki avatar May 30 '22 08:05 j-piasecki

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?

it happens at version 1.5.3

zhuliminl avatar May 31 '22 06:05 zhuliminl

In that case I would recommend upgrading to a newer version, as there is a possibility that it is already fixed.

j-piasecki avatar Jun 01 '22 07:06 j-piasecki