Browse Source

Merge pull request #337 from jjallaire/ontouchstart-nullcheck

check window.ontouchstart != null (required for qtwebkit)
embed
Hakim El Hattab 12 years ago
parent
commit
2d0237538c
  1. 2
      js/reveal.js

2
js/reveal.js

@ -439,7 +439,7 @@ var Reveal = (function(){
} }
if ( config.controls && dom.controls ) { 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.controlsLeft.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateLeftClicked, false ); } );
dom.controlsRight.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateRightClicked, false ); } ); dom.controlsRight.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateRightClicked, false ); } );
dom.controlsUp.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateUpClicked, false ); } ); dom.controlsUp.forEach( function( el ) { el.removeEventListener( actionEvent, onNavigateUpClicked, false ); } );

Loading…
Cancel
Save