move text selection to TextScanner
This commit is contained in:
parent
1bdef2e7c3
commit
595636c40b
@ -185,10 +185,6 @@ class Frontend {
|
||||
type,
|
||||
{definitions, context: {sentence, url, focus, disableHistory: true}}
|
||||
);
|
||||
|
||||
if (this.options.scanning.selectText) {
|
||||
textSource.select();
|
||||
}
|
||||
}
|
||||
|
||||
async findTerms(textSource) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user