Check pendingLookup earlier

This commit is contained in:
toasted-nutbread 2019-10-24 21:39:23 -04:00
parent 9703e123bf
commit e542f38110

View File

@ -174,12 +174,13 @@ class Frontend {
this.preventNextMouseDown = false; this.preventNextMouseDown = false;
this.preventNextClick = false; this.preventNextClick = false;
if (this.pendingLookup) { return; }
const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null; const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null;
this.searchAt(primaryTouch.clientX, primaryTouch.clientY, 'touchStart') this.searchAt(primaryTouch.clientX, primaryTouch.clientY, 'touchStart')
.then(() => { .then(() => {
if ( if (
this.pendingLookup ||
this.textSourceCurrent === null || this.textSourceCurrent === null ||
this.textSourceCurrent.equals(textSourceCurrentPrevious) this.textSourceCurrent.equals(textSourceCurrentPrevious)
) { ) {