Use v3 detectors in ReanimatedDrawerLayout - #4234
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates ReanimatedDrawerLayout to use v3 “virtual/intercepting” detectors so the drawer content and drawer panel remain true siblings in the native view hierarchy (avoiding Fabric zIndex trapping caused by the v3 NativeDetector wrapper), fixing the DrawerType.BACK regression described in #4229.
Changes:
- Replace the outer
GestureDetectorwithInterceptingGestureDetectorto enable virtual gesture handling without introducing additional host views. - Replace the inner
GestureDetector(overlay dismiss tap) withVirtualGestureDetectorso the content view is no longer wrapped in a native detector host view.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
j-piasecki
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A
BACKdrawer is meant to sit behind the content, relying on the content view'szIndex: 1002painting over the drawer'szIndex: 1001as siblings inside main. In v3 the content is wrapped byNativeDetector, which renders a host view. On Fabric that wrapper traps the content's zIndex, so the unwrapped sibling drawer paints on top.Fixes #4229
Test plan
Tested on
ReanimatedDrawerLayoutexample