mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
DEV: Disable 'passive' handlers for pan-events mixin (#15118)
These were set to `passive: true` in ff72522f
.
However, two consumers of this mixin (topic-navigation and site-header) do need to call `e.preventDefault()`, so we can't use passive listeners here.
That's ok, because this mixin only applies to a specific component's element, not the entire page. So having these non-passive listeners doesn't affect the vast majority of scrolling
This commit is contained in:
parent
136189508b
commit
bca5c58c90
@ -34,7 +34,7 @@ export default Mixin.create({
|
||||
this.touchCancel = (e) => this._panMove({ type: "pointercancel" }, e);
|
||||
|
||||
const opts = {
|
||||
passive: true,
|
||||
passive: false,
|
||||
};
|
||||
element.addEventListener("touchstart", this.touchStart, opts);
|
||||
element.addEventListener("touchmove", this.touchMove, opts);
|
||||
|
Loading…
Reference in New Issue
Block a user