[Webkit-unassigned] [Bug 10871] New: IME key events different in nightly

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Fri Sep 15 09:22:21 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=10871

           Summary: IME key events different in nightly
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
               URL: http://gmail.com
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: mdavids at gmail.com


When typing into a textarea using an IME, current Safari gives only keyup
events (not keydown or keypress) when the IME is active. Nightly webkit builds
give normal key events for all keys pressed.

This is a problem for Gmail. In the compose textarea, for example, it performs
an autocomplete when the enter key is pressed. In current Safari it can detect
when the enter key is pressed in order to commit an IME character because it
doesn't get a keydown. In the nightly build, it's impossible to detect this
enter from the following enter, which should trigger a the autocomplete.

To see this, set the input method to "Katakana" and create a contact in Gmail
with the first character of the name "カ" (obtained by pressing
k-a-enter). With Safari on 10.4, if you type this character in the compose box,
the enter key will bring up the autocomplete filtered by the first character as
expected. In nightly webkit, however, the first enter key will actually do the
autocompletion, which is the problem.

I have set up a page at http://bantha.org/~mdavids/ime.html to demonstrate the
problem. When you type k-a-enter-enter with current Safari on 10.4, these are
the key events you get:

down keycode: 75 which: 75 length: 0
press keycode: 107 which: 107 length: 0
up keycode: 75 which: 75 length: 0
up keycode: 65 which: 65 length: 0
up keycode: 13 which: 13 length: 1    // first enter, commits the character
down keycode: 13 which: 13 length: 1  // second enter, commits the autocomplete
press keycode: 13 which: 13 length: 1
up keycode: 13 which: 13 length: 1


With nightly webkit, this is what you get:

down keycode: 75 which: 75 length: 0
press keycode: 107 which: 107 length: 0
up keycode: 75 which: 75 length: 1
down keycode: 65 which: 65 length: 1
press keycode: 97 which: 97 length: 1
up keycode: 65 which: 65 length: 1
down keycode: 13 which: 13 length: 1     // first enter
press keycode: 13 which: 13 length: 1
up keycode: 13 which: 13 length: 1
down keycode: 13 which: 13 length: 1     // second enter
press keycode: 13 which: 13 length: 1
up keycode: 13 which: 13 length: 1

There is no way to distinguish the first and second enter, which is the
problem.

The behavior doesn't have to revert to current Safari's behavior, but Gmail
needs a way to distinguish enter in IME from regular enter. Any difference in
the key events can be exploited, but there has to be some difference.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list