diff options
author | olivierbloch | 2013-10-01 15:15:10 -0700 |
---|---|---|
committer | olivierbloch | 2013-10-01 15:15:10 -0700 |
commit | 27bf130611575fed9f1779a835ee997615d3f050 (patch) | |
tree | 4afbdcc822c57d3d9722397117254dd4948c3fc8 /js/reveal.js | |
parent | e608dafaf112f1adb2b131f9e390ff19920d791b (diff) |
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
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/reveal.js b/js/reveal.js index 4e9873b..8da0b1b 100644 --- a/js/reveal.js +++ b/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 ) { - 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 ) { + // 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 ); } + } if( config.keyboard ) { |