web-components icon indicating copy to clipboard operation
web-components copied to clipboard

fix: focus select when opening on toggle button click

Open web-padawan opened this issue 5 months ago • 1 comments

Description

Unlike other components like vaadin-combo-box and vaadin-date-picker, clicking toggle button does NOT focus the vaadin-select-value-button, whereas clicking anywhere else in vaadin-input-container does focus it.

This can end up with some unexpected scenarios e.g. focus one select with keyboard -> click toggle button in the second select -> close that select -> focus remains in the first select (not in the one that has been interacted with).

Updated the logic to check for this case and call focus() when opening so that focus can be saved and restored.

Type of change

  • Bugfix

web-padawan avatar Jun 27 '25 10:06 web-padawan