testing-library / testing-library/user-event
Missing `select` event on hidden documents
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
Prerequisites
- Render a form control with selection range (
<input type="text">,<textarea>) - Change selection in the form control
Expected behavior
A select event is dispatched.
Actual behavior
There is no select event if document.visibilityState is hidden.
User-event version
14.5.2
Environment
DOM implementation: Chromium 131.0.6778.204 built on Debian GNU/Linux 12 (bookworm)
Additional context
similar to #553
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 tests/environment/select.ts at the linked lines and reproduce the selection change with document.visibilityState hidden in the stated Chromium environment. Done means the form control dispatches a select event in that hidden-document case, with the relevant test covering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100