Skip to content

fix(core): remove doubled focus ring on Selector trigger#3088

Merged
cixzhang merged 1 commit into
mainfrom
navi/fix/selector-double-outline
Jun 25, 2026
Merged

fix(core): remove doubled focus ring on Selector trigger#3088
cixzhang merged 1 commit into
mainfrom
navi/fix/selector-double-outline

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

Fixes #3083 — a doubled focus ring ("circle covering the dropdown selector") that appears on Selector after selecting an option or navigating with the keyboard.

Root cause

Selector's wrapper <div> already renders the focus indicator through the shared inputWrapperStyles.base: on :focus-within it draws an accent border plus an inset 0 0 0 2px ring. But the inner <button role="combobox"> carried its own :focus-visible accent outline (rounded, via borderRadius + outlineOffset):

outline: {
  default: 'none',
  ':focus-visible': `${borderVars['--border-width']} solid ${colorVars['--color-accent']}`,
},
outlineOffset: '0',
borderRadius: radiusVars['--radius-element'],

When focus lands on that button (clicking the chevron, pressing the arrow keys, etc.), both rings render at once — the wrapper's :focus-within border + inset shadow, and the button's own rounded outline stacked on top. That stacked rounded outline is the artifact in the repro.

The sibling input components establish the intended pattern: TextInput and NumberInput give their inner focusable element outline: 'none' and rely solely on the wrapper's :focus-within ring. Selector deviated from this.

Fix

Remove the inner button's own :focus-visible outline (and the now-unused outlineOffset/borderRadius) so it defers to the wrapper's focus ring, exactly like the other input components. A single, consistent focus indicator now renders.

Testing

  • All 21 Selector unit tests pass
  • eslint clean, tsc --noEmit clean

The inner combobox button drew its own :focus-visible accent outline on top of the wrapper's :focus-within ring, stacking into a doubled, rounded outline over the trigger after selection or keyboard navigation. Defer to the wrapper's focus ring like TextInput/NumberInput.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
astryx Ignored Ignored Jun 24, 2026 10:35pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Vercel Preview Deployment

Status ✅ Deployed
Preview Open Preview
Commit 85d9695
Inspect Vercel Dashboard
Workflow View Logs

No authentication required — anyone with the link can view the preview.

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jun 24, 2026
@cixzhang cixzhang enabled auto-merge (squash) June 24, 2026 23:09
@cixzhang cixzhang merged commit 35dd2df into main Jun 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] There's a circle covering the dropdown selector after selected on cards

2 participants