waitFor not working for nested TapGestureHandlers #1303
Unanswered
dandre-hound
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a pretty simple component, a notification with a profile photo. The notification is tappable (which triggers a subtle reanimated v2.0.0-rc.1 opacity/scale animation), and the profile photo is also tappable (same animation). The profile photo is rendered as a child of the notification component, and it has its own tap gesture handler (using gesture handler v1.9.0). The component looks like so:
When I tap on the profile photo, both animations are fired. I only want the profile photo's animation to run. My understanding of
waitFor
would let me only activate the profile photo animation. Is this not possible...? I've tried every combination ofwaitFor
,simultaneousHandlers
,minDist
, etc and no matter what, both animations run if I tap the child component (the photo). Tapping the parent component triggers the correct animation, and the profile photo does not animate. What makes it worse is that when releasing the profile photo gesture, the photo's animation resets, but the parent component's animation does not?Am I completely misunderstanding how UI hierarchy works with gesture handlers?
I tried to make an expo snack, but reanimated 2.0.0-rc.1 doesn't seem to be supported.
#784 seems to be the same issue, though I'm seeing this on both ios and android.
Beta Was this translation helpful? Give feedback.
All reactions