Closed sdudnic closed 2 years ago
Hi @sdudnic, thanks for creating this issue.
I've already documented this problem here.
You have to visit about:config
and set dom.events.asyncClipboard.clipboardItem
to true
.
Hi @sdudnic, thanks for creating this issue.
I've already documented this problem here.
You have to visit
about:config
and setdom.events.asyncClipboard.clipboardItem
totrue
.
could you also inform all my users of my site of that procedure? Should I create a UserManual of how to use my site?
So, it seems there is no univseral solution to copy an image to clipboard. Modifying the settings in Firefox should event not be proposed: any client of the web application is aware of that manipunation to do, so in practice is not a solution.
For now the only way of copying images on Firefox is setting this flag to true, but obviously you should not ask your users to do that.
You can still use this library and check if it's possible to copy to clipboard or not using the canCopyImagesToClipboard
function (example from docs). This way people using browsers that support copying images will have the functionality.
This library only makes easier copying images to clipboard using browser web API's, it's not my fault that Firefox decided to hide this feature behind a flag.
https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem#browser_compatibility
The example https://luanedcosta.github.io/copy-image-clipboard/ does not work in Firefox, we obtain the message
Browsers (please complete the following information)
Browser name: Firefox (Windows) Version: 103.0.2 (64-bit)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots