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

[Touch handling] Navigator intercepts normal scrollView gesture.

Open smalllixin opened this issue 11 years ago • 8 comments

Hi. I meet a gesture conflict issue when using navigator. As screenshot shown. A horizontal scrollview on the top. And this scene is pushed from with Navigator.SceneConfigs.PushFromRight.

When drag the scrollview on the left edge of screen navigator intercept the scrollview's pan gesture and perform a pop action. However this will not happen in the native app. How can I fix it? Thanks in advance.

simulator-screen-shot-sep-18 -2015 -5 17 32-pm

smalllixin avatar Sep 18 '15 09:09 smalllixin

Hi,

you could e.g. tell the navigator to not react on the swipe from left by specifying the following:

  configureScene: function(route) {
    return {...Navigator.SceneConfigs.FloatFromRight, gestures: null};
  },

PhilippKrone avatar Sep 18 '15 10:09 PhilippKrone

Can you please use Stack Overflow to ask questions and tag them with react-native? http://stackoverflow.com/questions/tagged/react-native

This helps us keep track of bugs that need to be fixed in Github issues.

mkonicek avatar Sep 18 '15 16:09 mkonicek

Does @PhilippKrone's answer resolve this? Please reopen if it doesn't.

mkonicek avatar Sep 18 '15 18:09 mkonicek

Thanks @PhilippKrone . However, this will prevent the entire swipe back gesture. Actually I want swipe-back still working and do not intercept the scrollview's pan gesture. That means if pan gesture begin in scrollview's area swipe-back gesture will not be recognized. And this is the default iOS app behavior. I think apple implement this by rewrite simultaneous gesture recognition strategy. So is there a way to specify whether gesture could simultaneous work with another in react-native world?

smalllixin avatar Sep 20 '15 16:09 smalllixin

@mkonicek I cannot perform reopen if a repo collaborator closed it.

smalllixin avatar Sep 20 '15 16:09 smalllixin

Oh sorry @smalllixin, it's good to know only collaborators can reopen, won't close issues next time.

mkonicek avatar Sep 22 '15 10:09 mkonicek

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/touch-handling-navigator-intercepts-normal-scrollview-gesture

ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We rely on the community to provide bugfixes as the core team is focused on performance.

mkonicek avatar Mar 16 '16 12:03 mkonicek

For more relevant info:

https://github.com/facebook/react-native/issues/1046

Product pain: https://productpains.com/post/react-native/improved-scrollview-touch-interactions

Hope this helps.

jedt avatar Feb 02 '17 05:02 jedt