From: JJ Allaire Date: Wed, 13 Feb 2013 13:10:27 +0000 (-0500) Subject: check window.ontouchstart != null (required for qtwebkit) X-Git-Tag: 2.3.0~54^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=45825b61b7ac336dd57dd21380f1f5128dbe7609;p=reveal.js.git check window.ontouchstart != null (required for qtwebkit) --- diff --git a/js/reveal.js b/js/reveal.js index fc5164d..5ed71c1 100644 --- a/js/reveal.js +++ b/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 ); } );