Drawer (Vaul-svelte) and Dialog compatibility #1595
Unanswered
BenOnTrack
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently working with the Drawer component from vaul-svelte (https://github.com/huntabyte/vaul-svelte), which is based on the Dialog component from Bits-UI. I also use the Dialog component directly from Bits-UI.
Here's the setup:
I have a Drawer component.
Inside the Drawer’s content, there's a button.
When the user clicks this button, it opens a Dialog using bind:open (while keeping the Drawer opened in the background)
Everything works fine up to this point (the Dialog appears on top of the Drawer). However, I'm encountering an issue where I can't interact with the Dialog content. For example, when I try to click inside a textarea, a Combobox, or other similar components, the pointer focus is immediately lost or kicked out. The focus seems to remain on the Drawer in the background.
I've tried adjusting the
trapFocus
parameter, but it hasn't resolved the issue.Do you have any idea what might be causing this behavior or suggestions on how to fix it?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions