-
-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Labels
contributions welcomeOpen to contributionsOpen to contributionsunder reviewBeing reviewed to determine whether it is an issue with Bits UI, a dependency, or user error.Being reviewed to determine whether it is an issue with Bits UI, a dependency, or user error.
Description
Describe the bug
The docs say:
When a Dialog closes, focus returns to the element that triggered its opening (typically the Dialog.Trigger).
I only see that happening if I either:
- Use
<Dialog.Trigger>
to open the dialog - Close a nested dialog
I understand the docs to mean that it should also happen even if I use a simple <button>
to set open
to true
.
But if I do that, then focus is returned to the body when the dialog is closed.
Reproduction
System Info
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 AMD Ryzen 7 5825U with Radeon Graphics
Memory: 4.94 GB / 22.83 GB
Binaries:
Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.12.1 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (139.0.3405.86)
Internet Explorer: 11.0.26100.1882
npmPackages:
svelte: catalog: => 5.33.2
Severity
annoyance
Metadata
Metadata
Assignees
Labels
contributions welcomeOpen to contributionsOpen to contributionsunder reviewBeing reviewed to determine whether it is an issue with Bits UI, a dependency, or user error.Being reviewed to determine whether it is an issue with Bits UI, a dependency, or user error.