Browse Source

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
olivierbloch 11 years ago
parent
commit
27bf130611
3 changed files with 8 additions and 14 deletions
  1. 0 1
      css/reveal.min.css
  2. 7 7
      js/reveal.js
  3. 1 6
      js/reveal.min.js

File diff suppressed because it is too large
+ 0 - 1
css/reveal.min.css


+ 7 - 7
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 ) {

File diff suppressed because it is too large
+ 1 - 6
js/reveal.min.js


Some files were not shown because too many files changed in this diff