From cf53321a791433d404a95c59114bc2ad70c06078 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 14 Aug 2009 21:57:46 +0000 Subject: [PATCH] Fix arrow throttling feature in mwsuggest which was broken in two entirely different but equally interesting ways. --- skins/common/mwsuggest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js index 4adcb9d422..d02c4958f0 100644 --- a/skins/common/mwsuggest.js +++ b/skins/common/mwsuggest.js @@ -553,6 +553,7 @@ function os_eventKeyup(e){ if(r == null) return; // not our event + os_last_keypress = 0; // some browsers won't generate keypressed for arrow keys, catch it if(os_keypressed_count == 0){ os_processKey(r,os_cur_keypressed,targ); @@ -596,9 +597,9 @@ function os_eventKeypress(e){ var d = new Date() var now = d.getTime(); if(now - os_last_keypress < 120){ - os_last_keypress = now; return; } + os_last_keypress = now; } os_keypressed_count++; @@ -616,7 +617,6 @@ function os_eventKeydown(e){ os_mouse_moved = false; os_cur_keypressed = (e.keyCode == undefined) ? e.which : e.keyCode; - os_last_keypress = 0; os_keypressed_count = 0; } -- 2.20.1