summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/document.js4
-rw-r--r--ext/fg/js/frontend.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js
index 8bb857e7..727bc5d2 100644
--- a/ext/fg/js/document.js
+++ b/ext/fg/js/document.js
@@ -89,7 +89,7 @@ function docImposterCreate(element, isTextarea) {
return [imposter, container];
}
-function docRangeFromPoint({x, y}) {
+function docRangeFromPoint({x, y}, options) {
const elements = document.elementsFromPoint(x, y);
let imposter = null;
let imposterContainer = null;
@@ -108,7 +108,7 @@ function docRangeFromPoint({x, y}) {
}
}
- const range = caretRangeFromPointExt(x, y, elements);
+ const range = caretRangeFromPointExt(x, y, options.scanning.deepDomScan ? elements : []);
if (range !== null) {
if (imposter !== null) {
docSetImposterStyle(imposterContainer.style, 'z-index', '-2147483646');
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 5a8d18c1..8a5c48d0 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -285,7 +285,7 @@ class Frontend {
return;
}
- const textSource = docRangeFromPoint(point);
+ const textSource = docRangeFromPoint(point, this.options);
let hideResults = !textSource || !textSource.containsPoint(point);
let searched = false;
let success = false;