aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-24 21:05:29 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-28 17:03:42 -0400
commitf2dec4ca20c1eddeda86ceb5c13795d4bacf19d6 (patch)
tree13c2a02ad98c42f90be7a0aa61e47c9d805fee96 /ext
parent8c5240d7a6cc325a628b32cf9e73ac6221517049 (diff)
Remove searchFromTouch
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend.js16
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);