-
Notifications
You must be signed in to change notification settings - Fork 23k
Bug-1773681 Showing Paste button for navigator.clipboard.readText() #42263
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
base: main
Are you sure you want to change the base?
Bug-1773681 Showing Paste button for navigator.clipboard.readText() #42263
Conversation
|
This pull request has merge conflicts that must be resolved before it can be merged. |
…or.clipboard.readText()
|
Preview URLs
Flaws (1)Note! 3 documents with no flaws that don't need to be listed. 🎉 URL:
External URLs (1)URL:
(comment last updated: 2025-12-11 17:19:01) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware that this change does not accurately reflect how to work with the clipboard in extensions across browsers. Specifically, Chrome does not expose navigator.clipboard to extension service workers and offscreen documents cannot access navigator.clipboard due to the API's document focus requirements. As a result, Chrome extensions have to fall back to using the deprecated document.execCommand() APIs in an offscreen document or using navigator.clipboad in a different context (content scripts or extension pages).
While I strongly feel that we should target cross-browser extension develpment, I don't want to block this PR or require a rewrite at the moment. That said, if we don't integrate cross-browser develpment in this revision, we may need to revise this article again in the coming months. @rebloor, do you have any preferences on how we should proceed?
…d.readText()' of ssh://github.com/rebloor/content into Bug-1773681-Showing-Paste-button-for-navigator.clipboard.readText()
…or.clipboard.readText()
|
@dotproto I've added the additional Chrome information. I'd checked for any additional information prior to making the changes and couldn't find anything suggesting there were any further considerations. Do you have a link to any Chrome documentation? |
Description
This change addresses the dev-docs-needed requirement of Bug 1773681 Enable showing "Paste" button for
navigator.clipboard.readText()when called from Addons which don't haveclipboardReadpermssion.The changes include:
document.execCommandmethods were removed.document.execCommandmethods.Related issues and pull requests
Notes in the BCD updated in mdn/browser-compat-data#28587