react-native-gesture-handler
react-native-gesture-handler copied to clipboard
Pan gesture with manual activation disables responding of any touchable in the app
Description
When using Pan gestures (this issue likely occurs with other gestures as well, but has only been tested with Pan) with manualActivation set to true, if a touch cancellation is triggered by the device (as can happen with palm rejection on an iPad), all touchable elements in the app become disabled until the next interaction with a gesture handler.
Steps to reproduce
const App = () => {
const pan = Gesture.Pan().manualActivation(true)
return (
<GestureHandlerRootView style={exampleStyles.root}>
<TouchableHighlight
onPress={() => console.log(2)}
underlayColor={'red'}
style={[exampleStyles.button, { backgroundColor: '#21da1a' }]}
>
<Text>OUTSIDE DETECTOR</Text>
</TouchableHighlight>
<GestureDetector gesture={pan}>
<View style={exampleStyles.area} />
</GestureDetector>
</GestureHandlerRootView>
);
}
const exampleStyles = StyleSheet.create({
root: {
flex: 1,
},
area: { flex: 1, backgroundColor: '#5e5e5e', marginTop: 100 },
button: {
width: 100,
height: 100,
backgroundColor: '#21da1a',
zIndex: 100,
position: 'absolute',
},
});
- Call palm rejection on device
- Try to press button
Snack or a link to a repository
https://snack.expo.dev/eAEHgFwLcHz1WI4yBQlRt
Gesture Handler version
2.15.0
React Native version
0.73.6
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
Debug mode
Device
Real device
Device model
iPad Pro (os 17.4.1)
Acknowledgements
Yes