kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.dev
MIT License
1.22k stars 62 forks source link

Combobox: trigger mode 'focus' prevents dropdown list from closing #387

Closed daelmaak closed 4 months ago

daelmaak commented 4 months ago

Describe the bug I use combobox as a way to have both a select and filter input field in one. I also want the dropdown list to open when user starts interacting with the combobox. So I tried to use focus trigger mode. It works as expected until user selects an option, because then the focus is moved away from the closing dropdown to the combobox input, which in turn reopens the dropdown again due to the focus trigger mode, this time with only 1 option.

image

So to the user it might look like she needs to confirm that selection by clicking the last remaining option and after she does it, the option deselects. Or user has to just leave the dropdown open and carry on, which is not great experience.

To Reproduce Steps to reproduce the behavior:

  1. With triggerMode === 'focus', click on a combobox
  2. Select an option
  3. Dropdown list didn't close

Expected behavior When an option is selected from dropdown list, the list should close, even despite the 'focus' trigger mode.

Desktop (please complete the following information):

0-don commented 4 months ago

yes having the same issues currently