Closed jacokok closed 2 weeks ago
I created a Stackblitz for reproduction: Link
It seems to be related to bits-ui. It works with bits-ui@1.0.0-next.28 and doesn't work with bits-ui@1.0.0-next.29 and later versions. The change in next.29 is related to Select: "Select/Combobox: add allowDeselect prop"
Ah, I know what this is. It's just a coincidence that I modified the select in next.29
, and it is completely unrelated to this.
Why it works on next.28
is that vault-svelte
also uses bits-ui@1.0.0-next.28
, so they share the same bits-ui
and thus the same dismissableLayer
logic, which determines what "floating" layer is on top to handle outside clicks appropriately.
Making bits an optional peer dependency will resolve this. Let me do some research, and we'll work this out.
Updating to bits-ui@1.0.0-next.41
and vaul-svelte@1.0.0-next.2
should resolve this issue. There is another issue I noticed that is in Bits UI that I'm still working out where after you open the select you can no longer close the drawer by clicking outside of it. It's being tracked via another issue on Bits.
Describe the bug
When using a select component inside of a drawer making a selection closes the drawer.
Reproduction
Logs
No response
System Info
Severity
blocking an upgrade