aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 62c077a2..877161c7 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -475,8 +475,12 @@ class Backend {
};
}
- _onApiClipboardGet() {
- return apiClipboardGet();
+ async _onApiClipboardGet() {
+ const clipboardPasteTarget = this.clipboardPasteTarget;
+ clipboardPasteTarget.innerText = '';
+ clipboardPasteTarget.focus();
+ document.execCommand('paste');
+ return clipboardPasteTarget.innerText;
}
// Command handlers