Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlled usage with modal={false} incorrectly adds pointer-events: none to body #509

Open
andrewn opened this issue Nov 12, 2024 · 1 comment

Comments

@andrewn
Copy link

andrewn commented Nov 12, 2024

I'm trying to use a controlled Drawer:

<Drawer.Root
  open={open}
  onOpenChange={onOpenChange}
  direction="right"
  modal={false}
 >...</Drawer.Root>

Actual behaviour

When I open the Drawer by toggling the open prop, pointer-events: none is added to the body. This means anything outside the Drawer isn't clickable.

Opening/closing via Drawer.Trigger works as expected, without block body pointer-events.

Expected behaviour

When modal={false} I'd expect to be able to interact with the rest of the document outside of the Drawer when it's open.

Test case

Here's some code showing the issue on Replit.

@NicHaley
Copy link

A dup of #492

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

No branches or pull requests

2 participants