aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend.js4
-rw-r--r--ext/mixed/js/text-scanner.js3
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 2adbde36..9ec66fb1 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -185,10 +185,6 @@ class Frontend {
type,
{definitions, context: {sentence, url, focus, disableHistory: true}}
);
-
- if (this.options.scanning.selectText) {
- textSource.select();
- }
}
async findTerms(textSource) {
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index fc57d6c3..0adcc0bd 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -206,6 +206,9 @@ class TextScanner {
const results = await this.publish('textSearch', {textSource, cause});
if (results.some((r) => r)) {
this.textSourceCurrent = textSource;
+ if (this.options.scanning.selectText) {
+ textSource.select();
+ }
}
this.pendingLookup = false;
}