Skip to content

[single-dropdown] Keep the dropdown open while its choices scrollbar is dragged - #380

Merged
RT567 merged 1 commit into
masterfrom
fix/single-dropdown-scrollbar-focus
Sep 30, 2026
Merged

RT567 merged 1 commit into
masterfrom
fix/single-dropdown-scrollbar-focus

Conversation

@RT567

@RT567 RT567 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

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-blur closes the dropdown. Each choice already calls preventDefault on mousedown to keep focus in the input, but the list itself (::sd/chosen-results) did not.

What changed

How to verify

In Chrome, open a single-dropdown whose 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

…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.
@RT567
RT567 merged commit 66162a2 into master Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant