aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language/text-scanner.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-28 22:30:12 -0500
committerGitHub <noreply@github.com>2023-12-29 03:30:12 +0000
commitc13ee62b84693346e28741d7f016c6700a2c27d4 (patch)
tree2cf4d708c31ccd9f2c4fe06b4b43b7fbccd0b635 /ext/js/language/text-scanner.js
parent39eeed805044388591bdb45a790414495a7bf321 (diff)
Add explicit passive option to touchstart event (#480)
Diffstat (limited to 'ext/js/language/text-scanner.js')
-rw-r--r--ext/js/language/text-scanner.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/language/text-scanner.js b/ext/js/language/text-scanner.js
index 9c254e44..aed431d3 100644
--- a/ext/js/language/text-scanner.js
+++ b/ext/js/language/text-scanner.js
@@ -1099,7 +1099,7 @@ export class TextScanner extends EventDispatcher {
_getTouchEventListeners(capture) {
return [
[this._node, 'auxclick', this._onAuxClick.bind(this), capture],
- [this._node, 'touchstart', this._onTouchStart.bind(this), capture],
+ [this._node, 'touchstart', this._onTouchStart.bind(this), {passive: true, capture}],
[this._node, 'touchend', this._onTouchEnd.bind(this), capture],
[this._node, 'touchcancel', this._onTouchCancel.bind(this), capture],
[this._node, 'touchmove', this._onTouchMove.bind(this), {passive: false, capture}],
@@ -1130,7 +1130,7 @@ export class TextScanner extends EventDispatcher {
if (documentElement !== null) {
entries.push([documentElement, 'mousedown', this._onSearchClickMouseDown.bind(this), capture]);
if (this._touchInputEnabled) {
- entries.push([documentElement, 'touchstart', this._onSearchClickTouchStart.bind(this), capture]);
+ entries.push([documentElement, 'touchstart', this._onSearchClickTouchStart.bind(this), {passive: true, capture}]);
}
}
return entries;