You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: I have a multi-choice drag and drop screen. I want the currently dragged choice to be on top, so i set its zIndex higher on dragStart. This sometimes results in other drags getting canceled and onFinalize and onDeactivate to never trigger, breaking UI.
Two issues:
According to the docs:
`Note that some of these callbacks are complementary:
if onBegin was called, it is guaranteed that onFinalize will be called later.
if onActivate was called, it is guaranteed that onDeactivate will be called later.
`
This is no longer true as zIndex changes sometimes drop them when gesture gets cancelled.
There is no reason the gesture should get canceled since the zIndex change did not actually affect the drag in any way, nothing rendered between finger and draggable.
Steps to reproduce
Open reproduction
try dragging one or both boxes around. The automated zIndex swap will cancel the drag unnexpectabily.
Spam click and drag around a bit. Over time you can see in the stats that begin and finalize drift, as well as activate vs deactivate.
Description
Scenario: I have a multi-choice drag and drop screen. I want the currently dragged choice to be on top, so i set its zIndex higher on dragStart. This sometimes results in other drags getting canceled and onFinalize and onDeactivate to never trigger, breaking UI.
Two issues:
`Note that some of these callbacks are complementary:
if onBegin was called, it is guaranteed that onFinalize will be called later.
if onActivate was called, it is guaranteed that onDeactivate will be called later.
`
This is no longer true as zIndex changes sometimes drop them when gesture gets cancelled.
Steps to reproduce
ScreenRecording_07-18-2026.18-39-41_1.MP4
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
https://github.com/voxlz/rngh-zindex-swap-repro
Gesture Handler version
3.1.0
React Native version
0.86.0
Platforms
iOS
JavaScript runtime
None
Workflow
Using Expo Prebuild or an Expo development build
Architecture
New Architecture (Fabric)
Build type
Debug mode
Device
Real device
Device model
iPhone 13
Acknowledgements
Yes