r55064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55063‎ | r55064 | r55065 >
Date:21:57, 14 August 2009
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
Fix arrow throttling feature in mwsuggest which was broken in two entirely different but equally interesting ways.
Modified paths:
  • /trunk/phase3/skins/common/mwsuggest.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/mwsuggest.js
@@ -553,6 +553,7 @@
554554 if(r == null)
555555 return; // not our event
556556
 557+ os_last_keypress = 0;
557558 // some browsers won't generate keypressed for arrow keys, catch it
558559 if(os_keypressed_count == 0){
559560 os_processKey(r,os_cur_keypressed,targ);
@@ -596,9 +597,9 @@
597598 var d = new Date()
598599 var now = d.getTime();
599600 if(now - os_last_keypress < 120){
600 - os_last_keypress = now;
601601 return;
602602 }
 603+ os_last_keypress = now;
603604 }
604605
605606 os_keypressed_count++;
@@ -616,7 +617,6 @@
617618 os_mouse_moved = false;
618619
619620 os_cur_keypressed = (e.keyCode == undefined) ? e.which : e.keyCode;
620 - os_last_keypress = 0;
621621 os_keypressed_count = 0;
622622 }
623623

Follow-up revisions

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

Comments

#Comment by Brion VIBBER (talk | contribs)   23:52, 18 August 2009

Ugh, why are we trying to override the system's existing key throttling? This makes things feel oddly sluggish to me.

#Comment by Brion VIBBER (talk | contribs)   23:56, 18 August 2009

Removed it entirely in r55291.

Status & tagging log