diff options
author | Hakim El Hattab | 2013-02-20 07:33:44 -0800 |
---|---|---|
committer | Hakim El Hattab | 2013-02-20 07:33:44 -0800 |
commit | d1943fcd916e66dbdad9020c0bb841ff3e0e2523 (patch) | |
tree | f5c7f0137a94cf0ad12d56070027dab810caf34d | |
parent | e1872c9115e371a21f2dc31f8c3bc1913ce518b7 (diff) | |
parent | 2cfabed9f3337d2b0dd14b686050e7c9ad60c1ff (diff) |
Merge pull request #338 from jjallaire/ontouchstart-add-nullcheck
ontouchstart null check in addEventListeners
-rw-r--r-- | js/reveal.js | 2 |
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 ); } ); |