Skip to content

[dev] [tofikwest] tofik/fix-github-multiselect-severity-dropdown#2886

Merged
tofikwest merged 2 commits into
mainfrom
tofik/fix-github-multiselect-severity-dropdown
May 21, 2026
Merged

[dev] [tofikwest] tofik/fix-github-multiselect-severity-dropdown#2886
tofikwest merged 2 commits into
mainfrom
tofik/fix-github-multiselect-severity-dropdown

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 21, 2026

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 MultipleSelector dropdown 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” Select opens on first click.

  • Bug Fixes
    • Always close on input blur (removed if (!onScrollbar) guard).
    • Removed CommandList onMouseUp re-focus to prevent re-opening over other controls.
    • Result: clicking outside dismisses the popup and overlapped controls (like @base-ui/react Select) receive the click.

Written for commit 0bf5dee. Summary will update on new commits. Review in cubic

… 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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment May 21, 2026 5:09am
comp-framework-editor Ready Ready Preview, Comment May 21, 2026 5:09am
portal Ready Ready Preview, Comment May 21, 2026 5:09am

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

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)
@tofikwest tofikwest merged commit b837dfb into main May 21, 2026
9 of 11 checks passed
@tofikwest tofikwest deleted the tofik/fix-github-multiselect-severity-dropdown branch May 21, 2026 05:05
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.

1 participant