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

property dismissible does not work in combination with onOpenChange #323

Open
landsman opened this issue Apr 16, 2024 · 3 comments · May be fixed by #329
Open

property dismissible does not work in combination with onOpenChange #323

landsman opened this issue Apr 16, 2024 · 3 comments · May be fixed by #329

Comments

@landsman
Copy link

I don't want to allow to close the drawer by clicking to overlay.
Property dismissible with value to false work like that.

The problem is when I use onOpenChange and open property with that. It stop working as it should.

Here is a reproduction demo: https://codesandbox.io/p/devbox/drawer-with-scale-forked-wwngth

@mfigdore
Copy link

mfigdore commented Apr 16, 2024

Try this:

<Drawer.Content 
onPointerDownOutside={event => event.preventDefault()} 
onEscapeKeyDown={event => event.preventDefault()}
>

@joaom00 joaom00 linked a pull request Apr 22, 2024 that will close this issue
@snymnd
Copy link

snymnd commented May 5, 2024

Have the same issue here, any fix?

@snymnd
Copy link

snymnd commented May 5, 2024

Try this:

<Drawer.Content 
onPointerDownOutside={event => event.preventDefault()} 
onEscapeKeyDown={event => event.preventDefault()}
>

This wouldn't work if you have to control the open state by using onOpenChange.

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 a pull request may close this issue.

3 participants