CaptainCodeman / svelte-headlessui

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

Bugs in some of the documentation examples #62

Closed samstorment closed 12 months ago

samstorment commented 1 year ago

The popover, menu, and autocomplete combobox have some strange bugs on the documentation site. Gifs and explanation below, ignore the weird artifacts in the Gifs.

OS: Windows 11 Browsers: Firefox 115.0.2 and Chrome 114.0.5735.248

Popover

Spam clicking the popover works fine until I spam the chevron SVG. My guess is that the click event is triggered twice, once from the button and once from the SVG somehow, and the rapid events cause the popover to permanently disappear. I only think this because holding down enter to trigger click events with the button focused causes the same issue.

Single clicking the SVG also causes the popover menu to flicker closed briefly and immediately reopen, see the Menu below for this behavior.

popover

Menu

Again, I think this bug is related to clicking specifically on the SVG. Seems to cause 2 click events, one that closes the menu and one that immediately reopens it. This doesn't happen if the click happens from a closed menu however.

menu

Autocomplete Combobox

This bug happens on Firefox but not on Chrome. Unable to try Safari. Again seems to be related to clicking the SVG that makes the menu disappear. I've had the menu disappear with a single click and spam clicks. Also noticed I was able to click the invisible menu to select different options.

autocomplete-combobox

philmas commented 1 year ago

I confirm the above. I ran into the same problem.