Open snrmwg opened 8 months ago
+1 having the same issue
Got the same issue. Some workarounds i found was to manually focus another element 300ms after you opened the drawer or (the one im using now) just place an focusable element inside the content and around your inputs.
<Drawer.Root bind:open={$editDialogOpen} onOpenChange={editDialogChange}>
<Drawer.Content>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div tabindex="0">
<Drawer.Header>
<Drawer.Title>Detail view</Drawer.Title>
</Drawer.Header>
... more content where we got some inputs
</div>
</Drawer.Content>
</Drawer.Root>
Describe the bug
When opening a drawer containing form elements (i.e.
textarea
) I would like to focus a specific element. Tried to use theopenFocus
for that reason. But focus is not set. Compared to bits-ui Dialog where all works like expected. I put both usecases in the Stackblitz.Reproduction
https://stackblitz.com/edit/vitejs-vite-q4c9mb?file=src%2FApp.svelte
Logs
No response
System Info
Severity
annoyance