windows.navigator.pointerEnabled
for backward compatibility reasons, IE11 sets both msPointerEnabled and pointerEnabled. Changed the order for the test and added 'else if' to not duplicate handlers on pointer eventsedit
parent
e608dafaf1
commit
27bf130611
File diff suppressed because one or more lines are too long
14
js/reveal.js
14
js/reveal.js
|
@ -595,18 +595,18 @@ var Reveal = (function(){
|
||||||
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
|
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
|
||||||
|
|
||||||
// Support pointer-style touch interaction as well
|
// Support pointer-style touch interaction as well
|
||||||
|
if( window.navigator.pointerEnabled ) {
|
||||||
|
// IE 11 uses un-prefixed version of pointer events
|
||||||
|
dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false );
|
||||||
|
dom.wrapper.addEventListener( 'pointermove', onPointerMove, false );
|
||||||
|
dom.wrapper.addEventListener( 'pointerup', onPointerUp, false );
|
||||||
|
} else if( window.navigator.msPointerEnabled ) {
|
||||||
// IE 10 uses prefixed version of pointer events
|
// IE 10 uses prefixed version of pointer events
|
||||||
if( window.navigator.msPointerEnabled ) {
|
|
||||||
dom.wrapper.addEventListener( 'MSPointerDown', onPointerDown, false );
|
dom.wrapper.addEventListener( 'MSPointerDown', onPointerDown, false );
|
||||||
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false );
|
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false );
|
||||||
dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false );
|
dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false );
|
||||||
}
|
}
|
||||||
// IE 11 uses un-prefixed version of pointer events
|
|
||||||
if( window.navigator.pointerEnabled ) {
|
|
||||||
dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false );
|
|
||||||
dom.wrapper.addEventListener( 'pointermove', onPointerMove, false );
|
|
||||||
dom.wrapper.addEventListener( 'pointerup', onPointerUp, false );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( config.keyboard ) {
|
if( config.keyboard ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue