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:
David Taylor 2021-11-28 10:42:59 +00:00 committed by GitHub
parent 136189508b
commit bca5c58c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);