Repository navigation
[single-dropdown] Keep the dropdown open while its choices scrollbar is dragged - #380
Merged
Merged
Conversation
…is dragged Chrome makes scroll containers focusable, so a press on the choices list's scrollbar moved focus off the input and the dropdown closed on blur. The list now prevents default on mousedown, as each choice does.
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.
Problem
In current Chrome, pressing (or dragging) the scrollbar of a
single-dropdown's choices list closes the dropdown, so a long list can't be scrolled with the scrollbar.Chrome now makes scroll containers focusable. A mousedown on the list's scrollbar moves focus from the dropdown's input to the list; the input's
:on-blurcloses the dropdown. Each choice already callspreventDefaulton mousedown to keep focus in the input, but the list itself (::sd/chosen-results) did not.What changed
single-dropdown: the::sd/chosen-resultslist callspreventDefaulton mousedown, so focus stays in the input. The scrollbar still scrolls; choosing a choice is unchanged.CHANGELOG.md: 2.29.5 section with this fix, plus entries for the already-merged radio-button label renders as a bare text node since the part migration — theme padding, :label-style, :label-class and rc-radio-button-label all silently lost (2.29.3/2.29.4) #376 (radio-button labels) and checkbox: string labels bypass the label part — :label-style, :label-class and label-click silently dead (same mechanism as #376) #377 (checkbox labels), which had none.How to verify
In Chrome, open a
single-dropdownwhose choices overflow (e.g. the demo page's dropdowns with many choices), then press and drag the list's scrollbar: the dropdown stays open and scrolls. Clicking a choice still selects it and closes the dropdown; clicking elsewhere, Tab and Escape still close it.🤖 Generated with Claude Code