Skip to content

fix: focus select when opening on toggle button click - #9573

Merged
web-padawan merged 3 commits into
mainfrom
fix/toggle-button-select-focus
Jun 30, 2025
Merged

web-padawan merged 3 commits into
mainfrom
fix/toggle-button-select-focus

Conversation

@web-padawan

Copy link
Copy Markdown
Member

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
web-padawan force-pushed the fix/toggle-button-select-focus branch from a43df0a to 8f256b5 Compare June 27, 2025 10:04
@web-padawan
web-padawan removed the request for review from DiegoCardoso June 30, 2025 07:07
@sonarqubecloud

Copy link
Copy Markdown

@web-padawan
web-padawan merged commit e5f848d into main Jun 30, 2025
@web-padawan
web-padawan deleted the fix/toggle-button-select-focus branch June 30, 2025 07:14
web-padawan added a commit that referenced this pull request Jun 30, 2025
)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Jun 30, 2025
)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants