Merge pull request #337 from jjallaire/ontouchstart-nullcheck

check window.ontouchstart != null (required for qtwebkit)
This commit is contained in:
Hakim El Hattab 2013-02-13 14:35:28 -08:00
commit 2d0237538c

View 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 ); } );