Bug 44376

Summary: [GTK] onkeyup and onkeydown fires twice in textarea
Product: WebKit Reporter: Shellex Wai <5h3ll3x>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ap, bugs-noreply, cemllyrios, evan, joone.hur, mcatanzaro, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   

Shellex Wai
Reported 2010-08-20 21:00:22 PDT
visit http://shellex.soso44.net/test/test_keydown.html for test = Steps to reproduce = - Assign focus to the textarea below. - Press a single alphanumeric character on the keyboard. - The event.keyCode of that key will appear in the div. = Expected behavior = onkeyup and onkeydown fires once each time a key is pressed. = Actual behavior= onkeydown fires twice in Chrome and WebkitGtk onkeyup fires twice in Chrome
Attachments
Martin Robinson
Comment 1 2010-08-23 17:22:57 PDT
I cannot reproduce this bug via the latest build of WebKitGTK+ from master or from the version of Chromium in the PPA. Do you have any more information on how to reproduce this?
Shellex Wai
Comment 2 2010-08-23 23:31:14 PDT
I update my debian sid and try GtkLauncher in libwebkit (ver 1.2.3-2) and Chrome unstable (ver 6.0.495.0 dev) then I visit http://lab.shellex.info/test/test_key.html and I type 'a' in textarea. the Chrome output as: [keydown] keyCode:229 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 [keyup] keyCode:65 GtkLauncher output as: [keydown] keyCode:65 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 but my firefox of debian sid and chrome of my android work well, them output as: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 Addition, I ask some of my friends to help me verify the problem. Some of them can reproduce the same problem and others can not. It's really weird. Here is my friends' test result: = Test 1 = Laptop, keyboard model is acer laptop OS: Ubuntu 10.04.1 Browser 1: Midori 0.2.7 Result 1: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 Browser 2: chromium 7.0.502.0 (57007) Result 2: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 2 = Netbook OS: Linux netbook 2.6.35-14-generic-pae #20~lucid2-Ubuntu Browser 1: Chomium 5.0.375.99 (51029) Ubuntu 10.04 Result 1: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 3 = Desktop PC OS: Debian Testing Browser 1: Midori 0.2.4 Result 1: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 4 = Desktop PC OS: Slackware 13.1 2.6.33.4-smp Browser 1: Chrome 6.0.495.0 dev Result 1: [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 5 = Laptop OS: ArchLinux Browser 1: midori 0.2.7 Result 1: [keydown] keyCode:65 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 6 = Laptop (Hasee HP520) OS: ArchLnux DE: Awesome Browser 1: Chromium 7.0.504.0 (57118) Result 1: [keydown] keyCode:229 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 [keyup] keyCode:65 Browser 2: Google Chrome 5.0.375.126 Result 2: [keydown] keyCode:229 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 = Test 7 = Laptop OS: Gentoo Browser 1: Chromium 7.0.504.0 (57042) Result 1: [keydown] keyCode:229 [keydown] keyCode:65 [keypress] keyCode:97 [keyup] keyCode:65 [keyup] keyCode:65 I find that this bug only occur to the browsers in laptop in my test case. And further, the behaviors of chrome and webkitgtk-based browsers are a little different, chrome will fire keyup event twice but webkitgtk doesn't. I also test webkit browsers in Mac and Windows, they are fine.
Evan Martin
Comment 3 2010-09-14 10:14:19 PDT
I believe keycode 229 is an IME-related notification. I'd be curious to see what IE does in your test case. I don't know a lot about this area but I'm not sure Chromium's behavior is necessarily incorrect. (I think the WebKitGtk behavior of sending the same keycode twice is suspicious, and Chromium's double-send on keyup also looks weird.)
Martin Robinson
Comment 4 2010-09-14 10:32:03 PDT
Shellex, what input method are you using?
Shellex Wai
Comment 5 2010-09-14 13:25:28 PDT
(In reply to comment #4) > Shellex, what input method are you using? I use ibus as my input method, although it's not enabled in the test process. (In reply to comment #3) > I believe keycode 229 is an IME-related notification. I'd be curious to see what IE does in your test case. I don't know a lot about this area but I'm not sure Chromium's behavior is necessarily incorrect. (I think the WebKitGtk behavior of sending the same keycode twice is suspicious, and Chromium's double-send on keyup also looks weird.) I quit ibus, then browsers behavior normally. Well, I am not sure is it a webkit bug or not...
Michael Catanzaro
Comment 7 2019-01-07 07:39:09 PST
Website is no longer available.
Note You need to log in before you can comment on or make changes to this bug.