Bug 15052 - GTK platform doesn't send keypress events
Summary: GTK platform doesn't send keypress events
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 14:54 PDT by Jasper Bryant-Greene
Modified: 2007-08-22 17:25 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jasper Bryant-Greene 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.
Comment 1 Jasper Bryant-Greene 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.
Comment 2 Jasper Bryant-Greene 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.