-
Notifications
You must be signed in to change notification settings - Fork 123
Set event listener passive option to false #42
Description
In chrome on the dual.html example, I see this error:
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
It can be fixed by changing these lines:
this.container.addEventListener( 'touchstart' , this.$onTouchStart , false, );
this.container.addEventListener( 'touchend' , this.$onTouchEnd , false );
this.container.addEventListener( 'touchmove' , this.$onTouchMove , false );
as follows:
this.container.addEventListener( 'touchstart' , this.$onTouchStart , {capture: false, passive: false} );
this.container.addEventListener( 'touchend' , this.$onTouchEnd , {capture: false, passive: false} );
this.container.addEventListener( 'touchmove' , this.$onTouchMove , {capture: false, passive: false} );