summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 13:27:26 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-22 20:35:26 -0500
commit024f969bfd884e43cd40f408d0e3ba32839be45f (patch)
tree8d86bf54477087b9d6a1c0682369e2af6ccef449 /ext/bg
parentdec7f6cabbe28b044698258a748685b1f0d35398 (diff)
Update comment on getClipboardText
Diffstat (limited to 'ext/bg')
-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.