-
Notifications
You must be signed in to change notification settings - Fork 429
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
(iOS) velocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
#972
Comments
event.nativeEvent.velocityX
of react-native-gesture-handler/PanGestureHandler
is always 0velocityX
of PanGestureHandler
is always 0
The patch I used:
|
velocityX
of PanGestureHandler
is always 0velocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
velocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
velocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
on iOS
velocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
on iOSvelocityX
of PanGestureHandler
is always 0 because of gestureRecognizer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
React native 73 with
react-native-pager-view
version6.2.0
required byreact-native-tab-view
.iOS 17 or 18
Description
I’m using the
react-native-gesture-handler/PanGestureHandler
andreact-native/Animated.View
to have a swipeable card where, when doing a left swipe, it shows a button under the card at the right. After upgrading toreact-native-pager-view
version6.2.0
on iOS, the behaviour started failing. When doing horizontal swipes on my card, theevent.nativeEvent.velocityX
was always 0 from theonHandlerStateChange
of thePanGestureHandler
, so I was not able to recognize the left-right swipe.This PR sounds related to that failure. Using a patch, I removed the
gestureRecognizer
, and it fixed my issue. I’m not sure I fully understand the why, though since I’m no iOS pro. I also observed that only a press seems possible, no swipeReproducible Demo
Used lib
Snippet:
With my patch or on version 6.1.4 my output is:
After upgrading to
6.2.0
or without my patch, I have the below output, and the swipe does not work; only the press seems to occur, explaining why I have less output than above.Note: I tried upgrading to
"react-native-tab-view": "4.0.5",
but it did not fix the issue!The text was updated successfully, but these errors were encountered: