@@ -101,16 +101,18 @@ export default class Siema {
101
101
preventClick : false ,
102
102
} ;
103
103
104
+ const eventOptions = { passive : true } ;
105
+
104
106
// Touch events
105
- this . selector . addEventListener ( 'touchstart' , this . touchstartHandler ) ;
106
- this . selector . addEventListener ( 'touchend' , this . touchendHandler ) ;
107
- this . selector . addEventListener ( 'touchmove' , this . touchmoveHandler ) ;
107
+ this . selector . addEventListener ( 'touchstart' , this . touchstartHandler , eventOptions ) ;
108
+ this . selector . addEventListener ( 'touchend' , this . touchendHandler , eventOptions ) ;
109
+ this . selector . addEventListener ( 'touchmove' , this . touchmoveHandler , eventOptions ) ;
108
110
109
111
// Mouse events
110
- this . selector . addEventListener ( 'mousedown' , this . mousedownHandler ) ;
111
- this . selector . addEventListener ( 'mouseup' , this . mouseupHandler ) ;
112
- this . selector . addEventListener ( 'mouseleave' , this . mouseleaveHandler ) ;
113
- this . selector . addEventListener ( 'mousemove' , this . mousemoveHandler ) ;
112
+ this . selector . addEventListener ( 'mousedown' , this . mousedownHandler , eventOptions ) ;
113
+ this . selector . addEventListener ( 'mouseup' , this . mouseupHandler , eventOptions ) ;
114
+ this . selector . addEventListener ( 'mouseleave' , this . mouseleaveHandler , eventOptions ) ;
115
+ this . selector . addEventListener ( 'mousemove' , this . mousemoveHandler , eventOptions ) ;
114
116
115
117
// Click
116
118
this . selector . addEventListener ( 'click' , this . clickHandler ) ;
0 commit comments