move text selection to TextScanner

This commit is contained in:
siikamiika 2019-12-05 22:48:05 +02:00
parent 1bdef2e7c3
commit 595636c40b
2 changed files with 3 additions and 4 deletions

View File

@ -185,10 +185,6 @@ class Frontend {
type,
{definitions, context: {sentence, url, focus, disableHistory: true}}
);
if (this.options.scanning.selectText) {
textSource.select();
}
}
async findTerms(textSource) {

View File

@ -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;
}