Skip to content

A platform for community discussion. Free, open, simple.

REVERT: makes touchstart passive (#22004)

Joffrey JAFFEUX32dd43e02cd1
diff --git a/plugins/chat/assets/javascripts/discourse/modifiers/chat/on-long-press.js b/plugins/chat/assets/javascripts/discourse/modifiers/chat/on-long-press.js
index 68ab69b28f6..e978b01c8b6 100644
--- a/plugins/chat/assets/javascripts/discourse/modifiers/chat/on-long-press.js
+++ b/plugins/chat/assets/javascripts/discourse/modifiers/chat/on-long-press.js
@@ -34,7 +34,7 @@ export default class ChatOnLongPress extends Modifier {
this.onLongPressCancel = onLongPressCancel || (() => {});
element.addEventListener("touchstart", this.handleTouchStart, {
- passive: false,
+ passive: true,
capture: true,
});
}
@@ -63,8 +63,6 @@ export default class ChatOnLongPress extends Modifier {
return;
}
- cancelEvent(event);
-
this.onLongPressStart(this.element, event);
this.element.addEventListener("touchmove", this.onCancel, {