Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pan gesture with manual activation disables responding of any touchable in the app #2885

Open
antonkarytski opened this issue Apr 30, 2024 · 0 comments
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@antonkarytski
Copy link

antonkarytski commented Apr 30, 2024

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.

Link to video

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',
  },
});
  1. Call palm rejection on device
  2. 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

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

1 participant