Repository navigation
fix: focus select when opening on toggle button click - #9573
Merged
Merged
Conversation
web-padawan
force-pushed
the
fix/toggle-button-select-focus
branch
from
June 27, 2025 10:04
a43df0a to
8f256b5
Compare
vursen
reviewed
Jun 30, 2025
web-padawan
force-pushed
the
fix/toggle-button-select-focus
branch
from
June 30, 2025 07:04
8f256b5 to
6a2d621
Compare
vursen
approved these changes
Jun 30, 2025
|
vaadin-bot
pushed a commit
that referenced
this pull request
Jun 30, 2025
vaadin-bot
pushed a commit
that referenced
this pull request
Jun 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Unlike other components like
vaadin-combo-boxandvaadin-date-picker, clicking toggle button does NOT focus thevaadin-select-value-button, whereas clicking anywhere else invaadin-input-containerdoes 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