Remove searchFromTouch
This commit is contained in:
parent
8c5240d7a6
commit
f2dec4ca20
@ -197,7 +197,7 @@ class Frontend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const touch = touches[index];
|
const touch = touches[index];
|
||||||
this.searchFromTouch(touch.clientX, touch.clientY, 'touchMove');
|
this.searchAt(touch.clientX, touch.clientY, 'touchMove');
|
||||||
|
|
||||||
e.preventDefault(); // Disable scroll
|
e.preventDefault(); // Disable scroll
|
||||||
}
|
}
|
||||||
@ -293,6 +293,8 @@ class Frontend {
|
|||||||
|
|
||||||
async searchAt(x, y, cause) {
|
async searchAt(x, y, cause) {
|
||||||
try {
|
try {
|
||||||
|
this.popupTimerClear();
|
||||||
|
|
||||||
if (this.pendingLookup || await this.popup.containsPoint(x, y)) {
|
if (this.pendingLookup || await this.popup.containsPoint(x, y)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -449,7 +451,7 @@ class Frontend {
|
|||||||
|
|
||||||
const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null;
|
const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null;
|
||||||
|
|
||||||
this.searchFromTouch(touch.clientX, touch.clientY, 'touchStart')
|
this.searchAt(touch.clientX, touch.clientY, 'touchStart')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (
|
if (
|
||||||
this.pendingLookup ||
|
this.pendingLookup ||
|
||||||
@ -482,16 +484,6 @@ class Frontend {
|
|||||||
this.clickPrevent = value;
|
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) {
|
selectionContainsPoint(selection, x, y) {
|
||||||
for (let i = 0; i < selection.rangeCount; ++i) {
|
for (let i = 0; i < selection.rangeCount; ++i) {
|
||||||
const range = selection.getRangeAt(i);
|
const range = selection.getRangeAt(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user