summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/search.js2
-rw-r--r--ext/mixed/js/text-scanner.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 2ba3e468..871c576b 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -208,7 +208,7 @@ class DisplaySearch extends Display {
onCopy() {
// ignore copy from search page
- this.clipboardMonitor.setPreviousText(document.getSelection().toString().trim());
+ this.clipboardMonitor.setPreviousText(window.getSelection().toString().trim());
}
onExternalSearchUpdate({text}) {
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index a1d96320..e6b9a2e6 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -133,7 +133,7 @@ class TextScanner {
this.preventNextClick = false;
const primaryTouch = e.changedTouches[0];
- if (DOM.isPointInSelection(primaryTouch.clientX, primaryTouch.clientY, this.node.getSelection())) {
+ if (DOM.isPointInSelection(primaryTouch.clientX, primaryTouch.clientY, window.getSelection())) {
return;
}