fix(combobox): Fix Space key selection for select-only comboboxes#3398
Merged
Conversation
🦋 Changeset detectedLatest commit: aa8624a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes keyboard interaction for select-only comboboxes by enabling the Space key to toggle selection of the currently highlighted option, while preserving the existing behavior for editable comboboxes (Space inserts a space into the input).
Changes:
- Treat Space as a selection toggle key for
select-onlycomboboxes (in addition to Enter), including preventing default Space behavior. - Add regression tests covering editable (space insertion), single-select select-only (space toggles), and multi-select select-only (space toggles).
- Add a changeset to publish the fix as a patch for
@sl-design-system/combobox.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/components/combobox/src/combobox.ts | Adds select-only Space-key handling to toggle the current option selection. |
| packages/components/combobox/src/combobox.spec.ts | Adds regression tests for Space behavior in editable, single-select select-only, and multi-select select-only modes. |
| .changeset/quiet-spaces-select.md | Documents and versions the fix as a patch release. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
a11ymiko
approved these changes
Jun 1, 2026
Diaan
approved these changes
Jun 2, 2026
jpzwarte
approved these changes
Jun 2, 2026
Contributor
🕸 Preview deploys |
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.
Summary
BEFORE
before.mov
AFTER
after.mov