summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/background.html2
-rw-r--r--ext/bg/js/backend.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/bg/background.html b/ext/bg/background.html
index fc0758cf..c45ef3cd 100644
--- a/ext/bg/background.html
+++ b/ext/bg/background.html
@@ -12,7 +12,7 @@
<link rel="icon" type="image/png" href="/mixed/img/icon128.png" sizes="128x128">
</head>
<body>
- <div id="clipboard-paste-target" contenteditable="true"></div>
+ <textarea id="clipboard-paste-target" contenteditable="true"></textarea>
<script src="/mixed/lib/handlebars.min.js"></script>
<script src="/mixed/lib/jszip.min.js"></script>
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 7b6498e1..ca03f94d 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -479,10 +479,12 @@ class Backend {
async _onApiClipboardGet() {
const clipboardPasteTarget = this.clipboardPasteTarget;
- clipboardPasteTarget.innerText = '';
+ clipboardPasteTarget.value = '';
clipboardPasteTarget.focus();
document.execCommand('paste');
- return clipboardPasteTarget.innerText;
+ const result = clipboardPasteTarget.value;
+ clipboardPasteTarget.value = '';
+ return result;
}
// Command handlers