Fall ce-0084 · Szenario scenario-clipboard-api

Clipboard API read/write works inconsistently with contenteditable

OS: Windows 11 Gerät: Desktop or Laptop Any Browser: Firefox 120.0 Tastatur: US Entwurf
clipboard-apipastefirefoxwindows

Diese Seite wurde noch nicht übersetzt

Derzeit wird der englische Originalinhalt angezeigt. Wir freuen uns über Ihre Hilfe bei der Übersetzung.

Phenomenon

When using the Clipboard API (navigator.clipboard.readText/writeText) with contenteditable elements, the behavior may be inconsistent. Reading clipboard content may not work during paste events, and writing to clipboard may not preserve formatting.

Reproduction example

  1. Create a contenteditable div.
  2. Listen for paste events.
  3. Try to read clipboard content using Clipboard API.
  4. Try to write formatted content to clipboard.
  5. Observe any errors or inconsistencies.

Observed behavior

  • In Firefox on Windows, Clipboard API may not work correctly with contenteditable.
  • Reading clipboard during paste may require user gesture.
  • Writing formatted content may not preserve HTML.
  • Permissions may be required inconsistently.

Expected behavior

  • Clipboard API should work seamlessly with contenteditable.
  • Reading should work during paste events.
  • Writing should preserve formatting when appropriate.

Varianten dieses Szenarios

Fall OS Browser Status
ce-0047 macOS Ubuntu 22.04 Chrome 120.0 Entwurf
ce-0084 Windows 11 Firefox 120.0 Entwurf

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: Firefox 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.