Skip to content

[drawer] Outside press dismiss stops working after interrupted swipe-open #4471

Closed

Description

@lunaxislu

Bug report

Current behavior

When a drawer is opened with Drawer.SwipeArea, an interrupted swipe-open interaction can leave outside press dismissal in a
broken state.

After the interrupted gesture, clicking the overlay or outside area may no longer close the drawer, even though the outside click
target is correct and the click reaches the overlay.

Expected behavior

After a swipe interaction is interrupted or canceled, outside press dismissal should recover normally, and clicking the overlay or
outside area should close the drawer.

Reproducible example

Local reproduction used during investigation:

  • @base-ui/react drawer with Drawer.SwipeArea
  • open by swipe
  • interrupt the gesture before normal release cleanup completes
  • click the overlay

I can provide a reduced reproduction if needed.

Base UI version

v1.3.0

Which browser are you using?

Primarily Safari and Chrome on macOS during investigation.

Which OS are you using?

macOS

Which assistive tech are you using (if applicable)?

None

Additional context

From investigation, this appears to be related to the swipe cancel path not running release-equivalent cleanup.

What I observed:

  • the overlay click target is correct
  • the failure is not caused by the overlay click missing the backdrop
  • the issue appears after interrupted swipe interactions
  • the drawer can remain open because outside press dismissal does not recover correctly

The likely root cause is that the cancel path does not fully reset swipe-related state the same way the normal release path does.

Activity

  1. added
    status: waiting for maintainer
    on Mar 29, 2026
  2. github-actions commented on Mar 30, 2026

    @github-actions

    This fix will be available in the next npm release of Base UI.

    In the meantime, you can try it out on our Canary release channel:

    npm i https://pkg.pr.new/@base-ui/react@4467
  3. added
    type: bug
    component: drawer
    and removed
    status: waiting for maintainer
    on Mar 30, 2026
  4. changed the title [-][Drawer] Outside press dismiss stops working after interrupted swipe-open[/-] [+][drawer] Outside press dismiss stops working after interrupted swipe-open[/+] on May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: drawertype: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions