mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-09 04:29:21 +00:00
Merge pull request #2644 from NSStudent/hotfix/copy-safari-issue
Fix: Copy fallback for safari
This commit is contained in:
1 file changed
+1
@@ -27,6 +27,7 @@ async function copyCodeToClipboard(button, highlightWrapper) {
|
|||||||
const sel = window.getSelection();
|
const sel = window.getSelection();
|
||||||
sel.removeAllRanges();
|
sel.removeAllRanges();
|
||||||
sel.addRange(range);
|
sel.addRange(range);
|
||||||
|
textArea.focus();
|
||||||
textArea.setSelectionRange(0, 999999);
|
textArea.setSelectionRange(0, 999999);
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
highlightWrapper.removeChild(textArea);
|
highlightWrapper.removeChild(textArea);
|
||||||
|
|||||||
Reference in new issue
Block a user