From 6fff87560840c15837a103a415b069f2dfe8e0e8 Mon Sep 17 00:00:00 2001 From: tijmen van graft Date: Tue, 8 May 2018 16:27:01 +0200 Subject: [PATCH] Fix google passive error Google 56 introduced passive mode to default be true. The script will throw errors --- dist/slideout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/slideout.js b/dist/slideout.js index 4813bdf..b4b82a4 100644 --- a/dist/slideout.js +++ b/dist/slideout.js @@ -207,7 +207,7 @@ Slideout.prototype._initTouchEvents = function() { } }; - doc.addEventListener(touch.move, this._preventMove); + doc.addEventListener(touch.move, this._preventMove, {passive: false}); /** * Resets values on touchstart @@ -298,7 +298,7 @@ Slideout.prototype._initTouchEvents = function() { }; - this.panel.addEventListener(touch.move, this._onTouchMoveFn); + this.panel.addEventListener(touch.move, this._onTouchMoveFn, {passive: false}); return this; };