aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/search.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index de2bca64..cbfce6a5 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -286,8 +286,10 @@ class DisplaySearch extends Display {
async getClipboardText() {
/*
Notes:
- apiClipboardGet doesn't work on firefox because document.execCommand('paste') requires
- user interaction. Therefore, navigator.clipboard.readText() is used.
+ apiClipboardGet doesn't work on Firefox because document.execCommand('paste')
+ results in an empty string on the web extension background page.
+ This may be a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1603985
+ Therefore, navigator.clipboard.readText() is used on Firefox.
navigator.clipboard.readText() can't be used in Chrome for two reasons:
* Requires page to be focused, else it rejects with an exception.