Skip to content

Conversation

@rebloor
Copy link
Contributor

@rebloor rebloor commented Dec 5, 2025

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 have clipboardRead permssion.

The changes include:

  • a release note.
  • an update to the Interact with the clipboard article. In addition to aligning the documentation with this change, references to the deprecated document.execCommand methods were removed.
  • an update to the clipboard section on the Pesmissions page to remove references to the deprecated document.execCommand methods.
  • an update to the Clipboard API overview page's Security consideration section to align the documentation with this change.

Related issues and pull requests

Notes in the BCD updated in mdn/browser-compat-data#28587

@rebloor rebloor requested review from Rob--W and dotproto December 5, 2025 18:04
@rebloor rebloor self-assigned this Dec 5, 2025
@rebloor rebloor requested review from a team as code owners December 5, 2025 18:04
@rebloor rebloor added the Content:WebExt WebExtensions docs label Dec 5, 2025
@rebloor rebloor requested review from pepelsbey and sideshowbarker and removed request for a team December 5, 2025 18:04
@github-actions github-actions bot added Content:WebAPI Web API docs Content:Firefox Content in the Mozilla/Firefox subtree size/m [PR only] 51-500 LoC changed labels Dec 5, 2025
@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Dec 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

Preview URLs

Flaws (1)

Note! 3 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
Title: Interact with the clipboard
Flaw count: 1

  • broken_links:
    • Link /en-US/docs/Web/Security/Secure_Contexts is a redirect
External URLs (1)

URL: /en-US/docs/Mozilla/Firefox/Releases/147
Title: Firefox 147 release notes for developers (Beta)

(comment last updated: 2025-12-11 17:19:01)

@sideshowbarker sideshowbarker removed their request for review December 8, 2025 03:52
Copy link
Collaborator

@dotproto dotproto left a 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?

@dotproto dotproto self-requested a review December 8, 2025 19:59
…d.readText()' of ssh://github.com/rebloor/content into Bug-1773681-Showing-Paste-button-for-navigator.clipboard.readText()
@rebloor
Copy link
Contributor Author

rebloor commented Dec 11, 2025

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree Content:WebAPI Web API docs Content:WebExt WebExtensions docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants