Closed weebao closed 26 minutes ago
As title. Props like closeOnOutsideClick and closeOnEscape from the primitive code in bits-ui no longer works after migrating to Svelte 5.
closeOnOutsideClick
closeOnEscape
<Dialog.Root closeOnOutsideClick={true}> <Dialog.Content> <Dialog.Header> <Dialog.Title>Title</Dialog.Title> <Dialog.Description> Description </Dialog.Description> </Dialog.Header> Content </Dialog.Content> </Dialog.Root>
No response
System: OS: Windows 10 10.0.26100 CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics Memory: 1.90 GB / 13.86 GB Binaries: Node: 22.11.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD pnpm: 9.12.3 - ~\AppData\Local\pnpm\pnpm.EXE Browsers: Edge: Chromium (130.0.2849.80) Internet Explorer: 11.0.26100.1882
annoyance
I think what you want is now on the Content component and it's called interactOutsideBehavior="close" https://next.bits-ui.com/docs/components/dialog#api-reference
Content
interactOutsideBehavior="close"
What @ieedan said 😃
Thank you!!
Describe the bug
As title. Props like
closeOnOutsideClick
andcloseOnEscape
from the primitive code in bits-ui no longer works after migrating to Svelte 5.Reproduction
Logs
No response
System Info
Severity
annoyance