Move check
This commit is contained in:
parent
1f0a434e96
commit
f927f806ba
@ -160,7 +160,6 @@ class SettingsPopupPreview {
|
|||||||
const source = new TextSourceRange(range, range.toString(), null);
|
const source = new TextSourceRange(range, range.toString(), null);
|
||||||
if (source === null) { return; }
|
if (source === null) { return; }
|
||||||
|
|
||||||
this.frontend.textSourceLast = null;
|
|
||||||
try {
|
try {
|
||||||
await this.frontend.searchSource(source, 'script');
|
await this.frontend.searchSource(source, 'script');
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -319,7 +319,10 @@ class Frontend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const textSource = docRangeFromPoint(x, y, this.options);
|
const textSource = docRangeFromPoint(x, y, this.options);
|
||||||
if (textSource === null) {
|
if (
|
||||||
|
textSource === null ||
|
||||||
|
(this.textSourceLast !== null && this.textSourceLast.equals(textSource))
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,11 +340,9 @@ class Frontend {
|
|||||||
let hideResults = false;
|
let hideResults = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!this.textSourceLast || !this.textSourceLast.equals(textSource)) {
|
this.pendingLookup = true;
|
||||||
this.pendingLookup = true;
|
const focus = (cause === 'mouse');
|
||||||
const focus = (cause === 'mouse');
|
hideResults = !await this.searchTerms(textSource, focus) && !await this.searchKanji(textSource, focus);
|
||||||
hideResults = !await this.searchTerms(textSource, focus) && !await this.searchKanji(textSource, focus);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (window.yomichan_orphaned) {
|
if (window.yomichan_orphaned) {
|
||||||
if (textSource && this.options.scanning.modifier !== 'none') {
|
if (textSource && this.options.scanning.modifier !== 'none') {
|
||||||
|
Loading…
Reference in New Issue
Block a user