Skip to content

Clipboard API parity #141704

Open
Open
@rebornix

Description

@rebornix

Here is a list of clipboard api issues we are currently facing on Web.

  • Workaround user permission
    • Write
      • Clipboard requests from extensions running in Web worker in Safari not classified by Safari as "in response to a user gesture" and will reject. We turn every click/keydown to clipboard request and any clipboard write is then classified as response to a user gesture.
      • Otherwise, use navigator.clipboard.writeText
      • Lastly document.execCommand('copy')
    • Read: navigator.clipboard.readText. To avoid prompt for user permission, we don't allow keybinding customizations.
  • Electron API parity Add access to electron clipboard.readHTML() API for Extensions #140976, Provide full electron clipboard API parity to extensions #139761
    • readText/writeText
    • readHTML/writeHTML
    • readRTL/writeRTL
    • readImage/writeImage
    • availableFormats
    • readBuffer/writeBuffer
  • Firefox Clipboard Service API not supported in FF #84084 (comment)
    • readText: only available in Browser extensions
    • writeText: available without permission in secure contexts and browser extensions, but only from user-initiated event callbacks
    • read/write(data: ClipboardItem[]): available when users have browser preference dom.events.asyncClipboard.dataTransfer set to true
  • Copy large text fails Fails To Copy Large Text #123030.

Metadata

Metadata

Assignees

Labels

debtCode quality issueseditor-clipboardEditor clipboard issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions