summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-12 21:01:49 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-22 20:35:26 -0500
commit11b94d5a82f520706b344fd70ffa9e502d18086c (patch)
tree5f8b6ca63f5b268bc99878d05079c48c55ac72f4 /ext/bg/js
parentbf93d9f5f923e8ad7571a6d588fbc756e1153742 (diff)
Make apiClipboardGet use plaintext
Also clear the value before returning
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 4 insertions, 2 deletions
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