We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90f4c6b commit 83d5d6bCopy full SHA for 83d5d6b
src/public/app/services/utils.js
@@ -487,12 +487,14 @@ function areObjectsEqual () {
487
}
488
489
function copyHtmlToClipboard(content) {
490
- const clipboardItem = new ClipboardItem({
491
- 'text/html': new Blob([content], {type: 'text/html'}),
492
- 'text/plain': new Blob([content], {type: 'text/plain'})
493
- });
494
-
495
- navigator.clipboard.write([clipboardItem]);
+ function listener(e) {
+ e.clipboardData.setData("text/html", content);
+ e.clipboardData.setData("text/plain", content);
+ e.preventDefault();
+ }
+ document.addEventListener("copy", listener);
496
+ document.execCommand("copy");
497
+ document.removeEventListener("copy", listener);
498
499
500
/**
0 commit comments