openui / open-ui

Maintain an open standard for UI and promote its adherence and adoption.
https://open-ui.org
Other
3.59k stars 191 forks source link

[select] mouse focus when clicking invoker to open dropdown #1081

Open josepharhar opened 3 months ago

josepharhar commented 3 months ago

We previously resolved to focus the currently selected option when the datalist popover dropdown thing is opened, and that works great when invoking the popup with a keyboard but I'm not sure it is the best when clicking the invoker button with a mouse to open it because we don't render a focus ring on the newly focused option because the browser sort of thinks we are in mouse focus mode.

@una gave me feedback that it looked weird when focus is set to an option after clicking the invoker button but there is no focus ring on the newly selected option.

I see a few remedies to this problem:

Any thoughts? @scottaohara