diff options
Diffstat (limited to 'ext/fg/js')
-rw-r--r-- | ext/fg/js/driver.js | 2 | ||||
-rw-r--r-- | ext/fg/js/util.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js index 97f29f89..7facda0a 100644 --- a/ext/fg/js/driver.js +++ b/ext/fg/js/driver.js @@ -103,7 +103,7 @@ class Driver { return; } - const textSource = textSourceFromPoint(point); + const textSource = textSourceFromPoint(point, this.options.scanning.imposter); if (textSource === null || !textSource.containsPoint(point)) { if (hideNotFound) { this.searchClear(); diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js index a7533846..641b73ac 100644 --- a/ext/fg/js/util.js +++ b/ext/fg/js/util.js @@ -93,12 +93,12 @@ function destroyImposters() { } } -function textSourceFromPoint(point) { +function textSourceFromPoint(point, imposter) { const element = document.elementFromPoint(point.x, point.y); if (element !== null) { if (element.nodeName === 'IMG' || element.nodeName === 'BUTTON') { return new TextSourceElement(element); - } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { + } else if (imposter && (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA')) { createImposter(element); } } |