Merge pull request #2644 from NSStudent/hotfix/copy-safari-issue

Fix: Copy fallback for safari
This commit is contained in:
Nuno C.
2025-12-22 17:17:41 +00:00
committed by GitHub

View File

@@ -27,6 +27,7 @@ async function copyCodeToClipboard(button, highlightWrapper) {
const sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
textArea.focus();
textArea.setSelectionRange(0, 999999);
document.execCommand("copy");
highlightWrapper.removeChild(textArea);