Explorar o código

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

JJ Allaire %!s(int64=12) %!d(string=hai) anos
pai
achega
45825b61b7
Modificáronse 1 ficheiros con 1 adicións e 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 ); } );