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
16
js/reveal.js
16
js/reveal.js
|
@ -595,18 +595,18 @@ var Reveal = (function(){
|
|||
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
|
||||
|
||||
// Support pointer-style touch interaction as well
|
||||
// IE 10 uses prefixed version of pointer events
|
||||
if( window.navigator.msPointerEnabled ) {
|
||||
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
|
||||
dom.wrapper.addEventListener( 'MSPointerDown', onPointerDown, false );
|
||||
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, 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 ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue