Skip to content

Commit

Permalink
Apply preventNextMouseDown to searchAtFromTouchEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Jan 26, 2025
1 parent bc62b8b commit 553cb1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ext/js/language/text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,16 @@ export class TextScanner extends EventDispatcher {
* @param {import('text-scanner').InputInfo} inputInfo
*/
async _searchAtFromTouchEnd(x, y, inputInfo) {
const textSourceCurrentPrevious = this._textSourceCurrent !== null ? this._textSourceCurrent.clone() : null;

await this._searchAt(x, y, inputInfo);

if (
this._textSourceCurrent !== null &&
!(textSourceCurrentPrevious !== null && this._textSourceCurrent.hasSameStart(textSourceCurrentPrevious))
) {
this._preventNextMouseDown = true;
}
}

/**
Expand Down

0 comments on commit 553cb1e

Please sign in to comment.