-
Notifications
You must be signed in to change notification settings - Fork 427
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
PagerView blocks cross-axis orientation gestures. #955
Comments
I'm also running into this. No matter what I do I can't get PagerView to stop consuming vertical scroll events, so having a PagerView inside of a ScrollView completely breaks the vertical scrolling of the ScrollView. Even if I completely disable scrolling on my PagerView I've tried several different methods and the only thing I've gotten even close to working is to write my own logic with the parent view of the PagerView
Then I basically have to completely rewrite all of the logic of vertical scrolling which is a nightmare because my ScrollView also uses a refresh at the top and bottom of the scroll, plus I have to rewrite inertia logic and everything else. Basically a manual full rewrite of ScrollViews scrolling logic. From what I can see looking through the issues on here this has been an issue for over 2 years. I tried reverting to an older verison of pager view but I can't get it to compile with react native 0.76. This seems like a common use case to have a PagerView inside of a scrollable list of some kind, why has this issue not been fixed for years? I was using the old react native community view pager on react native 0.72 and it worked just fine but since I upgraded to 0.76 I was forced to upgrade to react native pager view and now I can't get basic functionality to work. Does anyone have a solution to this problem? |
same for me, even when disabling scrolling, it still consumes the pan event. |
We had a horizontal
Versions: |
Environment
react-native: 0.76.5
react-native-pager-view: 6.6.1
react-native-gesture-handler: 2.20.2
expo: 52.0.19
Description
<PagerView />
component blocks cross orientation gestures. I tried wrapping it with a<GestureDetector />
that takes aGesture.Pan()
but it wouldn't let vertical movements trigger even though it is on orientation horizontal.I tried following what's in this issue software-mansion/react-native-gesture-handler#3268, I managed to catch the gesture, but only after a first horizontal pan.
Screen.Recording.2025-01-08.at.00.52.38.mov
Reproducible Demo
The text was updated successfully, but these errors were encountered: