ActionListItem: Better handle modifier keys
Closes #4194
Changelog
- Updated the handling of keyboard events within the ActionListItem component. Previously,
onKeyPresswas used. This has been replaced withonKeyDownto move away from now deprecated APIs. - Additionally, instead of checking the produced character value in
event.key, these changes now useevent.codeto check the actual key pressed.
New
N/A
Changed
N/A
Removed
N/A
Rollout strategy
- [x] Patch release
- [ ] Minor release
- [ ] Major release; if selected, include a written rollout or migration plan
- [ ] None; if selected, include a brief description as to why
Testing & Reviewing
Using macOS, using Option + Space should now results in correct functionality.
Merge checklist
- [x] Added/updated tests
- [ ] Added/updated documentation
- [x] Added/updated previews (Storybook)
- [x] Changes are SSR compatible
- [x] Tested in Chrome
- [ ] Tested in Firefox
- [ ] Tested in Safari
- [ ] Tested in Edge
- [ ] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)
🦋 Changeset detected
Latest commit: f6f32ea70e405a96d1a2ec7cb2d1956a19080e0f
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @primer/react | Patch |
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
size-limit report 📦
| Path | Size |
|---|---|
| packages/react/dist/browser.esm.js | 113 KB (-0.01% 🔽) |
| packages/react/dist/browser.umd.js | 113.67 KB (+0.02% 🔺) |
@broccolinisoup I haven't had a chance to come back to this, but the last I saw this had CI errors. Which it doesn't now... 😕
I looked at it briefly when it was failing and it seemed that my changes adding the keydown handler had inadvertently affected the AutoComplete component.
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.