-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(keyboard): select all per {Control}+[KeyA]
#774
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a598fee:
|
00a092e
to
fe024be
Compare
Codecov Report
@@ Coverage Diff @@
## alpha #774 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 66 +2
Lines 1384 1394 +10
Branches 544 549 +5
=========================================
+ Hits 1384 1394 +10
Continue to review full report at Codecov.
|
[Ctrl]+[A]
{Control}+[KeyA]
🎉 This PR is included in version 14.0.0-alpha.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
See #778 (comment) |
What:
Select all per key combination.
Why:
Default behavior in the browser.
How:
Add a behaviorPlugin for
keydown
on{Control>}[KeyA]
.Checklist:
Additional information
This requires proper handling of selection ranges.
user-event/src/utils/edit/selectionRange.ts
Line 15 in 3fa471f
Renders our implementation of
userEvent.keyboard('{selectall}')
obsolete which allows to remove the onlyspecialChar
andbehaviorPlugin
that has no corresponding behavior in the browser.Also allows us to replace the implementation of
userEvent.clear()
.