Open
Description
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')
- 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
- Read:
navigator.clipboard.readText
. To avoid prompt for user permission, we don't allow keybinding customizations.
- Write
- 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 extensionswriteText
: available without permission in secure contexts and browser extensions, but only from user-initiated event callbacksread/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.