diff options
| -rw-r--r-- | ext/fg/js/frontend.js | 16 | 
1 files changed, 4 insertions, 12 deletions
| diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 07c1f0dc..bc4e8cc3 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -197,7 +197,7 @@ class Frontend {          }          const touch = touches[index]; -        this.searchFromTouch(touch.clientX, touch.clientY, 'touchMove'); +        this.searchAt(touch.clientX, touch.clientY, 'touchMove');          e.preventDefault(); // Disable scroll      } @@ -293,6 +293,8 @@ class Frontend {      async searchAt(x, y, cause) {          try { +            this.popupTimerClear(); +              if (this.pendingLookup || await this.popup.containsPoint(x, y)) {                  return;              } @@ -449,7 +451,7 @@ class Frontend {              const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null; -            this.searchFromTouch(touch.clientX, touch.clientY, 'touchStart') +            this.searchAt(touch.clientX, touch.clientY, 'touchStart')              .then(() => {                  if (                      this.pendingLookup || @@ -482,16 +484,6 @@ class Frontend {          this.clickPrevent = value;      } -    searchFromTouch(x, y, cause) { -        this.popupTimerClear(); - -        if (this.pendingLookup) { -            return Promise.resolve(); -        } - -        return this.searchAt(x, y, cause); -    } -      selectionContainsPoint(selection, x, y) {          for (let i = 0; i < selection.rangeCount; ++i) {              const range = selection.getRangeAt(i); |