Bug 15052

Summary: GTK platform doesn't send keypress events
Product: WebKit Reporter: Jasper Bryant-Greene <m>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: PC   
OS: Linux   

Jasper Bryant-Greene
Reported 2007-08-22 14:54:33 PDT
In WebCore/html/HTMLInputElement.cpp, code exists to submit the form when a keypressEvent for the Enter key is received on a text field within the form. However, this doesn't work on GTK. It appears that the field never receives a keypressEvent (but it does receive a keydownEvent and keyupEvent). Changing the conditional on line 1159 to check for keyupEvent rather than keypressEvent works, however I have not yet ascertained why keypressEvent does not happen on GTK.
Attachments
Jasper Bryant-Greene
Comment 1 2007-08-22 15:07:15 PDT
I've updated the summary - this is a more general problem. GTK's PlatformKeyboardEvent hard-codes autoRepeat to false (KeyEventGdk.cpp:483). This means keypress events never happen. Unfortunately I can't find a way to get auto-repeat events from GTK for a keypress, but if I can find something I'll submit a patch.
Jasper Bryant-Greene
Comment 2 2007-08-22 17:25:47 PDT
Sorry, got the cause of this bug completely wrong. Apologies for the noise - I will submit a new bug with the actual cause to avoid confusing the issue.
Note You need to log in before you can comment on or make changes to this bug.