diff --git a/utils/clipboard.ts b/utils/clipboard.ts index 6b5e96295..a6958288b 100644 --- a/utils/clipboard.ts +++ b/utils/clipboard.ts @@ -10,7 +10,8 @@ export const fallbackCopyToClipboard = (text: string): boolean => { document.body.appendChild(textArea); textArea.focus(); - textArea.select(); + const selected = textArea.select(); + if (!selected) return false; return document.execCommand('copy'); } catch {