check window.ontouchstart != null (required for qtwebkit)
authorJJ Allaire <jj@rstudio.org>
Wed, 13 Feb 2013 13:10:27 +0000 (08:10 -0500)
committerJJ Allaire <jj@rstudio.org>
Wed, 13 Feb 2013 13:10:27 +0000 (08:10 -0500)
js/reveal.js

index fc5164df5f10bc64989b5750ea8d25fc1cc5ef79..5ed71c147768b2b4ff1fce5e17e822f937c7d487 100644 (file)
@@ -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 ); } );