Skip to content

Use v3 detectors in ReanimatedDrawerLayout - #4234

Merged
m-bert merged 1 commit into
mainfrom
@mbert/drawer-regression
Jun 3, 2026
Merged

Use v3 detectors in ReanimatedDrawerLayout#4234
m-bert merged 1 commit into
mainfrom
@mbert/drawer-regression

Conversation

@m-bert

@m-bert m-bert commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Description

A BACK drawer is meant to sit behind the content, relying on the content view's zIndex: 1002 painting over the drawer's zIndex: 1001 as siblings inside main. In v3 the content is wrapped by NativeDetector, 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 ReanimatedDrawerLayout example

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GestureDetector with InterceptingGestureDetector to enable virtual gesture handling without introducing additional host views.
  • Replace the inner GestureDetector (overlay dismiss tap) with VirtualGestureDetector so 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.

@m-bert
m-bert merged commit a423a6e into main Jun 3, 2026
3 checks passed
@m-bert
m-bert deleted the @mbert/drawer-regression branch June 3, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReanimatedDrawerLayout with drawerType={DrawerType.BACK} is visible when closed (regression in 3.0)

3 participants