Case ce-0052 · Scenario scenario-paste-event-handling

preventDefault on paste event does not prevent default paste behavior

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
paste events preventDefault chrome

Phenomenon

In Chrome on Windows, calling preventDefault() on the paste event does not always prevent the default paste behavior. Content may still be pasted despite the prevention.

Reproduction example

  1. Create a contenteditable div.
  2. Add a paste event listener that calls event.preventDefault().
  3. Copy some text.
  4. Paste into the contenteditable.
  5. Observe whether the paste is prevented.

Observed behavior

  • In Chrome on Windows, preventDefault() on paste may not work.
  • Content may still be pasted.
  • The default behavior is not consistently prevented.

Expected behavior

  • preventDefault() on paste should prevent the default paste behavior.
  • No content should be pasted when prevented.
  • The behavior should be consistent and reliable.

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: US
Your environment

Use this editable area to reproduce the described case.

Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.