Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard API parity #141704

Open
rebornix opened this issue Jan 28, 2022 · 0 comments
Open

Clipboard API parity #141704

rebornix opened this issue Jan 28, 2022 · 0 comments
Assignees
Labels
debt Code quality issues editor-clipboard Editor clipboard issues

Comments

@rebornix
Copy link
Member

rebornix commented Jan 28, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality issues editor-clipboard Editor clipboard issues
Projects
None yet
Development

No branches or pull requests

1 participant