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 events
This commit is contained in:
parent
e608dafaf1
commit
27bf130611
3 changed files with 11 additions and 23 deletions
6
css/reveal.min.css
vendored
6
css/reveal.min.css
vendored
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 ) {
|
||||
|
|
12
js/reveal.min.js
vendored
12
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue