Explorar el Código

check window.ontouchstart != null (required for qtwebkit)

JJ Allaire hace 11 años
padre
commit
45825b61b7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -439,7 +439,7 @@ var Reveal = (function(){
 		}
 
 		if ( config.controls && dom.controls ) {
-			var actionEvent = 'ontouchstart' in window ? 'touchstart' : 'click';
+			var actionEvent = 'ontouchstart' in window && window.ontouchstart != null ? 'touchstart' : 'click';
 			dom.controlsLeft.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateLeftClicked, false ); } );
 			dom.controlsRight.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateRightClicked, false ); } );
 			dom.controlsUp.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateUpClicked, false ); } );