summaryrefslogtreecommitdiff
path: root/ext/fg/js/driver.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r--ext/fg/js/driver.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index e94a4ac2..98c50a02 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -144,6 +144,7 @@ window.driver = new class {
const textSource = docRangeFromPoint(point, this.options.scanning.imposter);
if (!textSource || !textSource.containsPoint(point)) {
+ docImposterDestroy();
return;
}
@@ -168,6 +169,7 @@ window.driver = new class {
return bgTermsFind(textSource.text()).then(({definitions, length}) => {
if (definitions.length === 0) {
+ docImposterDestroy();
return false;
} else {
textSource.setEndOffset(length);
@@ -186,6 +188,7 @@ window.driver = new class {
textSource.select();
}
+ docImposterDestroy();
return true;
}
});