ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
Research direction
Start in useComboBox, where the issue says useSelectableCollection handles the input keydown while the popover is open, and check the existing ComboBox tests for keyboard behavior. Verify that Cmd/Ctrl+A selects input text in multiple selection mode with the popover open, while preserving the documented single mode behavior; add or update a focused test for the expected result.
Written by the indexing model from the issue text.
Description
Provide a general summary of the issue here
In a multi-select ComboBox, pressing Cmd+A / Ctrl+A doesn't select the text in the input while the popover is open. It doesn't select any options either, so the shortcut just does nothing.
🤔 Expected Behavior?
Cmd/Ctrl+A selects the text in the input, same as with selectionMode="single" or when the popover is closed.
😯 Current Behavior
Nothing happens. The keydown is default-prevented, so the browser doesn't select the text, and the selection doesn't change. As far as I can tell:
- useComboBox applies the onKeyDown from useSelectableCollection to the input while the popover is open. It doesn't pass disallowSelectAll.
- In multiple selection mode, useSelectableCollection handles Mod+A by calling manager.selectAll(). The handler returns undefined, so the event gets preventDefault().
- selectAll() calls onSelectionChange('all'), and useComboBoxState ignores that (if (keys === 'all') return;).
💁 Possible Solution
Pass disallowSelectAll: true to useSelectableCollection in useComboBox. Select-all-options from a text field seems unexpected to me
🔦 Context
We use a multi-select ComboBox in forms. Users can't use Modl+A to clear or replace what they've typed in the filter input.
🖥️ Steps to Reproduce
<ComboBox selectionMode="multiple">
<Label>Fruit</Label>
<Input />
<Button>▼</Button>
<Popover>
<ListBox>
<ListBoxItem>Apple</ListBoxItem>
<ListBoxItem>Banana</ListBoxItem>
<ListBoxItem>Cherry</ListBoxItem>
</ListBox>
</Popover>
</ComboBox>
- Type "an" so the popover opens.
- Press Cmd/Ctrl+A. Nothing gets selected.
Version
react-aria-components 1.22.0
What browsers are you seeing the problem on?
Firefox
If other, please specify.
No response
What operating system are you using?
MacOS 26
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 1.6k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 41
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from adobe/react-spectrum
-
Difficulty 2/5 Under an hour Newbie friendliness 88/100
adobe/react-spectrum#10909 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
adobe/react-spectrum#10900 · 2 comments ·
Maintainers usually reply within 1 day
-
Separator adds a redundant role="separator" to its default <hr>Possibly taken @Janani-bn claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
adobe/react-spectrum#10894 · 2 comments ·
Maintainers usually reply within 1 day
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Possibly taken @mangeshraut712 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
adobe/react-spectrum#10856 ·
Maintainers usually reply within 1 day
-
ComboBox fires change events on blur when isReadOnly, clearing a fully controlled value that is not in the collectionPossibly taken @mangeshraut712 claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
adobe/react-spectrum#10846 ·
Maintainers usually reply within 1 day
All issues in adobe/react-spectrum
Similar issues
-
needs-area
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/typespec-azure#5936 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
vercel-labs/scriptc#2910 ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:fireworks-ai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#12458 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day