r55291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55290‎ | r55291 | r55292 >
Date:23:55, 18 August 2009
Author:brion
Status:ok
Tags:
Comment:
Disable the mysterious keypress throttling that overrides your operating system's keypress throttling for the up and down arrow keys in mwsuggest drop down.
The throttle didn't work prior to r55064, which was just fine since it makes your system behave more slowly for no apparent reason. :)
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/common/mwsuggest.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/mwsuggest.js
@@ -13,7 +13,6 @@
1414 var os_cache = {};
1515 // global variables for suggest_keypress
1616 var os_cur_keypressed = 0;
17 -var os_last_keypress = 0;
1817 var os_keypressed_count = 0;
1918 // type: Timer
2019 var os_timer = null;
@@ -553,7 +552,6 @@
554553 if(r == null)
555554 return; // not our event
556555
557 - os_last_keypress = 0;
558556 // some browsers won't generate keypressed for arrow keys, catch it
559557 if(os_keypressed_count == 0){
560558 os_processKey(r,os_cur_keypressed,targ);
@@ -593,14 +591,6 @@
594592 return; // not our event
595593
596594 var keypressed = os_cur_keypressed;
597 - if(keypressed == 38 || keypressed == 40){
598 - var d = new Date()
599 - var now = d.getTime();
600 - if(now - os_last_keypress < 120){
601 - return;
602 - }
603 - os_last_keypress = now;
604 - }
605595
606596 os_keypressed_count++;
607597 os_processKey(r,keypressed,targ);
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1588,7 +1588,7 @@
15891589 * to ensure that client-side caches do not keep obsolete copies of global
15901590 * styles.
15911591 */
1592 -$wgStyleVersion = '236';
 1592+$wgStyleVersion = '237';
15931593
15941594
15951595 # Server-side caching:

Follow-up revisions

RevisionCommit summaryAuthorDate
r55311Follow-up to r55291: remove arrow key throttling from jquery.suggestions.js a...catrope07:41, 19 August 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55064Fix arrow throttling feature in mwsuggest which was broken in two entirely di...catrope21:57, 14 August 2009

Status & tagging log