diff options
author | Hakim El Hattab | 2013-03-17 18:21:03 -0400 |
---|---|---|
committer | Hakim El Hattab | 2013-03-17 18:21:03 -0400 |
commit | 4ff462078b9ce4acd27210764bac3950db046173 (patch) | |
tree | 218cdb356ea3d281f4579540c86fef0e815569c1 /js/reveal.js | |
parent | e74a10e364f2512cd9139b133576d0896463629c (diff) |
always kill touch events on removelisteners (#365)
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/js/reveal.js b/js/reveal.js index c504cfa..5f4ae06 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -471,16 +471,14 @@ var Reveal = (function(){ window.removeEventListener( 'hashchange', onWindowHashChange, false ); window.removeEventListener( 'resize', onWindowResize, false ); - if( config.touch ) { - dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false ); - dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); - dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); - - if( window.navigator.msPointerEnabled ) { - dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false ); - dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false ); - dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false ); - } + dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false ); + dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); + dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); + + if( window.navigator.msPointerEnabled ) { + dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false ); + dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false ); + dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false ); } if ( config.progress && dom.progress ) { |