Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js |
— | — | @@ -368,24 +368,10 @@ |
369 | 369 | conf._data.keypressed_count = 0; |
370 | 370 | }) |
371 | 371 | .keypress( function() { |
372 | | - // When arrow up/down keys are held down, |
373 | | - // keypress events fire rapidly. Slow this down |
374 | | - // to one in every 120 ms |
375 | | - if ( conf._data.keypressed == 38 || conf._data.keypressed == 40 ) { |
376 | | - var now = new Date().getTime(); |
377 | | - if ( now - conf._data.last_keypress < 120 ) { |
378 | | - return; |
379 | | - } |
380 | | - } |
381 | | - conf._data.last_keypress = now; |
382 | 372 | conf._data.keypressed_count++; |
383 | 373 | processKey( conf._data.keypressed ); |
384 | 374 | }) |
385 | 375 | .keyup( function() { |
386 | | - // Reset last_keypress here instead of in |
387 | | - // keydown because at least in Firefox, all |
388 | | - // keypresses are preceded by a keydown |
389 | | - conf._data.last_keypress = 0; |
390 | 376 | // Some browsers won't throw keypress() for |
391 | 377 | // arrow keys. If we got a keydown and a keyup |
392 | 378 | // without a keypress in between, solve that |