Closed xdung24 closed 1 year ago
Unfortunately this is a Firefox problem. They decided to disable the ClipboardItem
by default, so we have to enable a flag on Firefox configs to work properly.
Print from MDN Docs: https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem#browser_compatibility
The browser ClipboardAPI is a recent feature with many cross-browser compatibility issues.
We should not ask for users to enable this flag. Instead, we can disable the copy button using the canCopyImagesToClipboard
function from this library.
Sorry for the long explanation. I plan to rewrite docs and the demo to explain these details in a better way.
Describe the bug
Code not working on latest Firefox, but works well on Google Chrome/Chromium The demo url for testing also doesn't work (https://luanedcosta.github.io/copy-image-clipboard/) I haven't test on older version of Mozilla Firefox
Browsers (please complete the following information)
Browser name: Mozilla Firefox Version: 107.0.1
Expected behavior
The demo page as well as the code should work properly
Screenshots