diff options
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index 3fffadb6d..ddc16dceb 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -82,15 +82,7 @@ export namespace Utils { } export function CopyText(text: string) { - const textArea = document.createElement("textarea"); - textArea.value = text; - document.body.appendChild(textArea); - textArea.focus(); - textArea.select(); - - try { document.execCommand('copy'); } catch (err) { } - - document.body.removeChild(textArea); + navigator.clipboard.writeText(text); } export function decimalToHexString(number: number) { |