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

Switched from deprecated document.execCommand to the clipboard API #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

volovikariel
Copy link
Contributor

I have not been able to test this on any browsers other than Firefox, but I'd expect it to work because the API seems to be supported on all major browsers.

Let me know if I'm missing anything 👍

@sfhelmet
Copy link

I tested it on Chrome v120.0.6099.131 and IE v116.0.1938.62. Works as expected!

@warren-bank
Copy link

doesn't work in the devtools tab:

DOMException: The Clipboard API has been blocked because of a Feature Policy applied to the current document.

@volovikariel
Copy link
Contributor Author

@warren-bank can you please share the website/element that you were trying to copy text from?

@warren-bank
Copy link

warren-bank commented Sep 28, 2024

@volovikariel any website.. the error happens when trying to export cookies to the clipboard from within devtools.. I can't remember if I was testing in Chrome or FF when I encountered the error. To make it easy to reproduce, I can tell you that v2.0.4 of my fork will have this issue.. it was released immediately after merging this PR but before noticing this problem in devtools.

I'm testing now.. will let you know which browsers are effected..

results are in.. it does work in Firefox.. it does not work in Chrome.

PS: adding the manifest permission clipboardWrite had no effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants