aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-13 19:38:53 -0400
committerbobzel <zzzman@gmail.com>2021-09-13 19:38:53 -0400
commitaf246480e97554233293ab1dfb08b5af5e1f9d7c (patch)
tree6529f8df17e62199080d1e0d2d3730da85d7f8d5 /src/Utils.ts
parentd15841974305bf01251f60fa73a8464c7cb914fe (diff)
fixed copyPath menu item for images/pdfs. fixed contextmenu right-clicking to not require preselection of doc.
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts10
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) {