CaptainCodeman / svelte-headlessui

HeadlessUI components for Svelte
https://captaincodeman.github.io/svelte-headlessui/
MIT License
529 stars 25 forks source link

Allow the event to continue bubbling instead of stopping at close #61

Closed danielimmke closed 1 year ago

danielimmke commented 1 year ago

Bug: When a Listbox or Menu is open, you have to click outside of it to close it, but the event stops propagating after that so if the click is for something else, you have to click twice.

Example

I tested this behavior in the Headless UI library, and the event does not stop propagating when you click outside of it:

Demo

It could be that the propagation should be stopped in some situations, but I don't believe it should be for Menu and Listbox. So I don't know if there should be a conditional flag higher up for specific components, since this change would affect the behavior for all components that utilize this.