-
-
Notifications
You must be signed in to change notification settings - Fork 987
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
simultaneousWithExternalGesture
regression, broken with 2.17.0, used to work with 2.16.2
#2963
Comments
simultaneousWithExternalGesture
regression, broken with 2.17.0, used to work with 2.16.2
Hi! I took the liberty of correcting Gesture Handler versions in PR title and description 😅 Could you please check if #2969 solves this issue? |
@m-bert while it does fix it in the reproduction demo, unfortunately I'm still noticing the issue on my actual app (unless I made a mistake somewhere). Is there an easy way for me to inspect the gesture tags to help you check if the bug is still there? Will double check. |
Well, you can try to log If you'd like to, you can try to look into Unfortunately, without proper reproduction we can't do much 😞 |
I will try to reproduce it in the repo, might be related to the number of children inside the SVGMask on the actual app, thanks for the guidance and hopefully we can find a fix! |
@m-bert good news, I was wrong and the fix is indeed working, not sure why but my actual app does not use the built output from either Fixed the patch and it works! Thanks a lot! |
## Description This PR replaces `queueMicrotask` with `requestAnimationFrame`. Turns out that introducing `useLayoutEffect` (which was introduced in #2925) ended up in gestures being attached in wrong order in some cases. This can be observed in #2963 (it is highly recommended to look into repro structure): 1. 3 handlers from `ZoomView` where attached - they have correct `tags` 2. Re-render happens, handlers' `tags` are now `-1` 3. `Pan` from `SVGMask` is attached - all handlers marked as `simultaneous` have `tag` `-1`, therefore relations are not set up 4. Handlers from 1. are attached again, so they get back their original `tags` In this scenario, `simultaneous handlers` array in `Pan` in `SVGMask` was empty, effectively disabling this relation. Switching to `requestAnimationFrame` solves this problem. ## Test plan Verify that examples work as they used to (`draggable`, `multitap`, `transformations`) Also tested on code from #2963 .
Description
I have some kind of zoom view in my application that has a pan/pinch/rotation gestures attached to it, on top of it I have an svg overlay (using
StyleSheet.absoluteFill
) that also has a pan gesture (in my case only for mouse/stylus but it does not matter). I configure simultaneousWithExternalGesture on this extra pan gesture.This worked well before and had both gesture working but after updating to 2.17.1 (tried 2.17.0 as well), the zoom view gesture is not working anymore.
Steps to reproduce
Snack or a link to a repository
https://github.com/mgcrea/react-native-reanimated-sandbox/tree/bug-gesture-handler-1
Gesture Handler version
2.17.1
React Native version
0.74.2
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPad Pro
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: