Bug 3387 - Redundant keydown, keypress, keyup events sent for arrow keys
Summary: Redundant keydown, keypress, keyup events sent for arrow keys
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL: http://www.quirksmode.org/js/events/d...
Keywords: InRadar
: 7876 10450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-09 09:46 PDT by Nat Irons
Modified: 2006-11-14 10:21 PST (History)
10 users (show)

See Also:


Attachments
proposed fix (7.70 KB, patch)
2006-11-11 12:07 PST, Alexey Proskuryakov
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Irons 2005-06-09 09:46:35 PDT
Safari 1.3, 2.0 and the 2005-05-09 webkit CVS all send pairs of the required key events for the arrow 
keys. The attached test page records the Safari event sequence for a single tap as "keydown, keypress, 
keydown, keypress, keyup, keyup".

I happen to have a 10.2.8 machine handy with Safari 1.0.3, which does not exhibit this behavior. Nor do 
Firefox 1.0.4, IE/Mac 5.2.2, or IE/Win 6. Safari sends single "keydown, keypress, keyup" events for keys 
other than arrows. Safari 2.0 and the CVS version were tested on 10.4.1.
Comment 1 Alexey Proskuryakov 2006-03-26 06:25:54 PST
*** Bug 7876 has been marked as a duplicate of this bug. ***
Comment 2 mitz 2006-05-05 07:31:40 PDT
I wonder if bug 8136 (a regression) is caused by redundant keyboard events.
Comment 3 Alexey Proskuryakov 2006-06-24 15:33:21 PDT
Reassigning to webkit-unassigned, to make sure more people see this.
Comment 4 David Kilzer (:ddkilzer) 2006-06-30 11:40:55 PDT
Hyatt: I had a crazy idea...could this be the cause of some of the performance problems with arrowing down to scroll a page?
Comment 5 Alexey Proskuryakov 2006-08-16 21:47:20 PDT
*** Bug 10450 has been marked as a duplicate of this bug. ***
Comment 6 Richard Standbrook 2006-09-21 01:39:39 PDT
(In reply to comment #4)
> Hyatt: I had a crazy idea...could this be the cause of some of the performance
> problems with arrowing down to scroll a page?
> 

I have seen the same problem with the function keys, escape key, home key and the page  up / page down keys. not just the arrow keys.
Comment 7 Dave Hyatt 2006-09-21 16:28:32 PDT
I wasn't aware there were perf problems when arrowing... do you have an example?
Comment 8 Richard Standbrook 2006-09-22 01:44:48 PDT
(In reply to comment #7)
> I wasn't aware there were perf problems when arrowing... do you have an
> example?
> 

see http://trac.mochikit.com/ticket/182 I'm using OS X 10.4.7 and Safari 2.0.4 on PowerPC (also behaves the same on my Intel with, I think, the same versions) I have also tried webkit nightly build from 21/09/06
Comment 9 Alexey Proskuryakov 2006-11-11 09:32:03 PST
To work around this problem, one can cancel default processing of the event by returning false from its handler.
Comment 10 Alexey Proskuryakov 2006-11-11 12:07:19 PST
Created attachment 11487 [details]
proposed fix
Comment 11 Timothy Hatcher 2006-11-13 17:23:19 PST
<rdar://problem/4125399>
Comment 12 Alexey Proskuryakov 2006-11-14 10:21:28 PST
Committed revision 17760.