-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix GestureHandler isWithinBounds top hitslop #1202
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
Fix GestureHandler isWithinBounds top hitslop #1202
Conversation
|
Thanks for the PR. Could you please post some code you tested this change on? |
|
@jakub-gonet I updated the description :) |
|
@jakub-gonet Is there any chances this could be added in the next release ? I am really looking forward this bug fix. Thanks ! |
|
Yeah, probably. I'll dedicate more time to the gesture handler in the next week, so I'll test and merge it. You can use patch-package until then. |
|
Hey @eeynard I copied and pasted your example to expo managed app. Even though it was using the release version of gesture handler it worked like you described in the expected behaviour without your changes. |
|
Hey @jkadamczyk, you're right, my example does not seems to be relevant. I made another one on snack, here is the link https://snack.expo.io/TGAF2FyWn. Hopefully this time you can reproduce the problem. I'll edit the PR description as well. Thank you ! Note: On the snack example the counter increments on every events received by RN-gesture-handler. You can see that it does not do anything on the red zone like it should but events are sent when you play with the bottom of the screen. |
|
Thank you!!! |
|
@eeynard Tested it works as it should. |
Description
This PR fixes a bug in
isWithinBoundsmaking GestureHandler hitSloptopnot usable.Test Plan
Create a new view with a PanGestureHandler and shrink the hitSlop to only the top part of the view. Events should not be sent when gesture are made outside de red area.
Before : Events were fired in the white and red area
After : Events are fired only on the red area as expected