testing-library / testing-library/user-event

`type` does not work with `contenteditable="plaintext-only"`

Open
#1,197 0 comments 2 reactions 0 assignees View on GitHub

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

https://codesandbox.io/p/devbox/whmpk9

Prerequisites

just run the jest tests in above sandbox

Expected behavior

expect tests to pass

Actual behavior

test failed on plaintext-only post-edits

image
User-event version

^14.1.1

Environment
"@testing-library/dom": "8.12.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/user-event": "^14.1.1"
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and run its Jest tests using the reported @testing-library/user-event version. Trace the type interaction for contenteditable="plaintext-only" after confirming the post-edit failure. Done means the reproduction's tests pass for plaintext-only contenteditable elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.