Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/fix-selector-double-focus-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@astryxdesign/core': patch
---

[fix] Remove doubled focus ring on `Selector`. The inner combobox button drew
its own `:focus-visible` outline on top of the wrapper's `:focus-within` ring,
producing a stacked, rounded outline over the trigger after selecting an option
or navigating with the keyboard. The button now defers to the wrapper's focus
ring, matching `TextInput` and `NumberInput`.
@cixzhang
11 changes: 5 additions & 6 deletions packages/core/src/Selector/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ const styles = stylex.create({
lineHeight: 'inherit',
color: 'inherit',
cursor: 'pointer',
outline: {
default: 'none',
':focus-visible': `${borderVars['--border-width']} solid ${colorVars['--color-accent']}`,
},
outlineOffset: '0',
borderRadius: radiusVars['--radius-element'],
// The wrapper (inputWrapperStyles.base) renders the focus ring via
// :focus-within when this button is focused, matching TextInput/NumberInput.
// The button must not draw its own :focus-visible outline or the two stack
// into a doubled ring over the trigger.
outline: 'none',
},
triggerPlaceholder: {
color: colorVars['--color-text-secondary'],
Expand Down
Loading