Skip to content

Commit

Permalink
throttle on keydown (arrows) causes scrolling on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed Mar 7, 2012
1 parent 8321fa7 commit 7a7d3e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/impress.js
Expand Up @@ -376,7 +376,7 @@
};

// keyboard navigation handler
document.addEventListener("keydown", throttle(function ( event ) {
document.addEventListener("keydown", function ( event ) {
if ( event.keyCode == 9 || ( event.keyCode >= 32 && event.keyCode <= 34 ) || (event.keyCode >= 37 && event.keyCode <= 40) ) {
switch( event.keyCode ) {
case 33: ; // pg up
Expand All @@ -395,7 +395,7 @@

event.preventDefault();
}
}, 50), false);
}, false);

// delegated handler for clicking on the links to presentation steps
document.addEventListener("click", function ( event ) {
Expand Down

0 comments on commit 7a7d3e7

Please sign in to comment.