summaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab2013-02-20 07:33:44 -0800
committerHakim El Hattab2013-02-20 07:33:44 -0800
commitd1943fcd916e66dbdad9020c0bb841ff3e0e2523 (patch)
treef5c7f0137a94cf0ad12d56070027dab810caf34d /js
parente1872c9115e371a21f2dc31f8c3bc1913ce518b7 (diff)
parent2cfabed9f3337d2b0dd14b686050e7c9ad60c1ff (diff)
Merge pull request #338 from jjallaire/ontouchstart-add-nullcheck
ontouchstart null check in addEventListeners
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index d315c89..7572569 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -408,7 +408,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.addEventListener( actionEvent, onNavigateLeftClicked, false ); } );
dom.controlsRight.forEach( function( el ) { el.addEventListener( actionEvent, onNavigateRightClicked, false ); } );
dom.controlsUp.forEach( function( el ) { el.addEventListener( actionEvent, onNavigateUpClicked, false ); } );