vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
807 stars 150 forks source link

Clicking focused serchable multiselect doesn't open options dropdown #329

Closed slaweet closed 1 year ago

slaweet commented 1 year ago

Version

Description

Actual behaviour

If I focus searchable multiselect in a way that doesn't open the options (e.g. clicking the associated <label/>, or keyboard tab), it's no longer possible to open the options by clicking the focused multiselect. I have to click away to remove the focus and only then it works.

Expected behaviour

Clicking the focused multiselect opens the options (if not already open) in the same way as clicking it non-focused.

Demo

https://jsfiddle.net/xgjokvc5/

heinebold commented 1 year ago

Every searchable Multiselect is affected!

It doesn't even need any special focus methods.

Description

When in a searchable Multiselect you select an option via keyboard (either arrow keys or search), you can't open the dropdown via mouse until you unfocus the Multiselect. In single and multiple modes, not even the caret works. In tags mode, the caret is fine but not clicking the free space/input. Selecting by arrow keys in a non-searchable one doesn't have that problem.

Demo / Steps to Reproduce

This JSFiddle contains searchable Multiselects for all three modes, you can verify it there: