[dev] [tofikwest] tofik/fix-github-multiselect-severity-dropdown#2886
Merged
Conversation
… sibling form controls The MultipleSelector's `CommandList` is rendered with `absolute top-1 z-10` and floats below the input. With several selected items and a tall option list it visually overlaps form fields below — including the `@base-ui/react` Select used elsewhere in the same form (e.g. the "Fail on open alerts at severity" dropdown in the GitHub integration setup). Two interacting behaviors made that overlap turn into "click does nothing": 1. The input's `onBlur` was gated on `onScrollbar` — when the mouse was over the open list (which it is, by definition, when the list overlaps the field you're trying to click), `setOpen(false)` was skipped and the list stayed mounted. 2. The `CommandList` re-focused the input on every `mouseup`, immediately reopening the dropdown after any click that happened over it. Together this trapped `mousedown`/`mouseup` on the floating popup. base-ui's `Select.Trigger` (the field below) registers a one-shot document `mouseup` listener when it receives `mousedown` and cancels the open if the `mouseup` lands outside the trigger's bounds — which is exactly what happened: the captured `mouseup` on `CommandList` told base-ui to cancel its open, so the severity dropdown never appeared. This change: - Removes the `if (!onScrollbar)` guard so the input's `onBlur` always closes the popup. Clicking anywhere outside the input now dismisses the dropdown immediately, restoring the natural focus contract. - Drops the `CommandList` `onMouseUp` re-focus that re-trapped the input. `CommandItem.onMouseDown` already calls `e.preventDefault()`, so item selection still keeps the input focused. The previous handler only mattered for stray clicks/scrollbar drags on the popup itself — and was the exact mechanism that made clicks on overlapped sibling controls (like the base-ui Select) unresponsive. Reproducible by: 1. Setting up the GitHub integration. 2. Picking one or more repositories so `CommandList` opens with options. 3. Clicking "Fail on open alerts at severity" — before this change the dropdown does not open; after this change it opens on the first click. Verified: `packages/ui` typecheck + build pass. No `MultipleSelector` consumer relies on `onMouseUp` re-focus (it was an internal CommandList prop, not part of the public API). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
claudfuen
pushed a commit
that referenced
this pull request
May 21, 2026
## [3.59.2](v3.59.1...v3.59.2) (2026-05-21) ### Bug Fixes * **ui:** close MultipleSelector dropdown on blur so it stops blocking sibling form controls ([3d7fc3f](3d7fc3f)), closes [#2886](#2886)
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.
This is an automated pull request to merge tofik/fix-github-multiselect-severity-dropdown into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Fixes the
MultipleSelectordropdown capturing clicks over fields below. It now closes on blur and no longer re-focuses on mouseup, so the GitHub setup “Fail on open alerts at severity”Selectopens on first click.if (!onScrollbar)guard).CommandListonMouseUpre-focus to prevent re-opening over other controls.@base-ui/reactSelect) receive the click.Written for commit 0bf5dee. Summary will update on new commits. Review in cubic