testing-library / testing-library/user-event
[keyboard] Can't trigger control+backspace
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
https://codesandbox.io/p/sandbox/xenodochial-snow-pcy89v?file=/src/App.test.js:12,1-14,31
Prerequisites
- Render input
<input defaultValue="1234" /> - Try to apply "crtl+backspace" keyboard event to input:
user.keyboard('{Control>}{Backspace}{/Control}')
Expected behavior
Input value should be cleared
Actual behavior
Only one char from input's value is deleted
User-event version
14.5.0
Environment
Testing Library framework: @testing-library/react@14.0.0
JS framework: react@18.2.0
Test environment: jest@29.7.0
DOM implementation: jest-environment-jsdom@29.7.0
Additional context
No response
Contributor 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.
Research direction
Start with the linked CodeSandbox reproduction and inspect src/App.test.js, especially the user.keyboard call using Control and Backspace. Compare the observed deletion with the expected clearing of the input value, then verify the corrected behavior against the same reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100