@@ -206,7 +206,7 @@ Slideout.prototype._initTouchEvents = function() {
206206 }
207207 } ;
208208
209- doc . addEventListener ( touch . move , this . _preventMove ) ;
209+ doc . addEventListener ( touch . move , this . _preventMove , { passive : true } ) ;
210210
211211 /**
212212 * Resets values on touchstart
@@ -222,7 +222,7 @@ Slideout.prototype._initTouchEvents = function() {
222222 self . _preventOpen = ( ! self . _touch || ( ! self . isOpen ( ) && self . menu . clientWidth !== 0 ) ) ;
223223 } ;
224224
225- this . panel . addEventListener ( touch . start , this . _resetTouchFn ) ;
225+ this . panel . addEventListener ( touch . start , this . _resetTouchFn , { passive : true } ) ;
226226
227227 /**
228228 * Resets values on touchcancel
@@ -232,7 +232,7 @@ Slideout.prototype._initTouchEvents = function() {
232232 self . _opening = false ;
233233 } ;
234234
235- this . panel . addEventListener ( 'touchcancel' , this . _onTouchCancelFn ) ;
235+ this . panel . addEventListener ( 'touchcancel' , this . _onTouchCancelFn , { passive : true } ) ;
236236
237237 /**
238238 * Toggles slideout on touchend
@@ -245,7 +245,7 @@ Slideout.prototype._initTouchEvents = function() {
245245 self . _moved = false ;
246246 } ;
247247
248- this . panel . addEventListener ( touch . end , this . _onTouchEndFn ) ;
248+ this . panel . addEventListener ( touch . end , this . _onTouchEndFn , { passive : true } ) ;
249249
250250 /**
251251 * Translates panel on touchmove
@@ -297,7 +297,7 @@ Slideout.prototype._initTouchEvents = function() {
297297
298298 } ;
299299
300- this . panel . addEventListener ( touch . move , this . _onTouchMoveFn ) ;
300+ this . panel . addEventListener ( touch . move , this . _onTouchMoveFn , { passive : true } ) ;
301301
302302 return this ;
303303} ;
0 commit comments