r55311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55310‎ | r55311 | r55312 >
Date:07:41, 19 August 2009
Author:catrope
Status:ok
Tags:
Comment:
Follow-up to r55291: remove arrow key throttling from jquery.suggestions.js as well
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js
@@ -368,24 +368,10 @@
369369 conf._data.keypressed_count = 0;
370370 })
371371 .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;
382372 conf._data.keypressed_count++;
383373 processKey( conf._data.keypressed );
384374 })
385375 .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;
390376 // Some browsers won't throw keypress() for
391377 // arrow keys. If we got a keydown and a keyup
392378 // without a keypress in between, solve that

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55291Disable the mysterious keypress throttling that overrides your operating syst...brion23:55, 18 August 2009

Status & tagging log