Bug 18704 - [gtk] cannot type letters with dead keys in textarea
Summary: [gtk] cannot type letters with dead keys in textarea
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-04-23 15:30 PDT by arno.
Modified: 2008-05-28 11:05 PDT (History)
2 users (show)

See Also:

calls doTextFieldCommandFromEvent on keydown for textareas (1.49 KB, patch)
2008-04-23 15:35 PDT, arno.
ap: review-
Details | Formatted Diff | Diff
Input method fixes (8.59 KB, patch)
2008-05-28 09:51 PDT, Alp Toker
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2008-04-23 15:30:46 PDT
I'm using some dead keys to type french letters. For exemple, I have a key mapped to dead_acute. I type that key + e to get é.
That works fine in <input> fields, but in <textarea>s, I cannot get accentuated letters. For <input>s, keydown events are passed to document()->frame()->doTextFieldCommandFromEvent() but not in textarea. That function will then call gtk_im_context_filter_keypress with gtk frontend.

I'll attach a patch to call that function also for <textearea>s. That seems to fix the problem on gtk. That may also enable other input method on textareas.
Comment 1 arno. 2008-04-23 15:35:51 PDT
Created attachment 20780 [details]
calls doTextFieldCommandFromEvent on keydown for textareas
Comment 2 Alp Toker 2008-05-27 22:50:53 PDT
Upgrading to P1. ap, any thoughts on whether this patch is correct?
Comment 3 Alexey Proskuryakov 2008-05-28 01:38:57 PDT
Comment on attachment 20780 [details]
calls doTextFieldCommandFromEvent on keydown for textareas

WebEditorClient::doTextFieldCommandFromEvent() is really only about text fields, which textareas are not. Invoking it for text areas would break Safari on the Mac, besides not being true to its name.

We could of course add another client method just for textareas, but processing dead keys in element default handlers doesn't seem right to me in general, it is a much lower level task. Perhaps WebEditorClient::handleKeyboardEvent() would be more appropriate.
Comment 4 Alp Toker 2008-05-28 09:51:10 PDT
Created attachment 21390 [details]
Input method fixes
Comment 5 Alexey Proskuryakov 2008-05-28 10:01:41 PDT
Comment on attachment 21390 [details]
Input method fixes

Obviously, I'm not an expert at GTK input methods, but this looks absolutely reasonable, r=me.

I would expect that this doesn't dispatch text input events in a manner compatible with IE and Safari though.
Comment 6 Alp Toker 2008-05-28 11:05:19 PDT
Fix landed in r34176. Thanks