Bug 10010 - REGRESSION: Pressing Return with unconfirmed text in Hangul inserts carriage return
Summary: REGRESSION: Pressing Return with unconfirmed text in Hangul inserts carriage ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Darin Adler
URL: http://www.google.com
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2006-07-19 10:23 PDT by Alexey Proskuryakov
Modified: 2007-02-12 11:22 PST (History)
2 users (show)

See Also:


Attachments
patch that fixes this and two other P1 international input regressions (82.86 KB, patch)
2007-02-11 12:04 PST, Darin Adler
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2006-07-19 10:23:08 PDT
Steps to reproduce:
1) Open www.google.com
2) Using Hangul input method, type something in the text field
3) Without closing the inline input session, press Return.

Results: Assertion fails:
=================
ASSERTION FAILED: value == constrainValue(value) || constrainValue(value).isEmpty() (/Users/ap/WebKit/WebCore/html/HTMLInputElement.cpp:1092 void WebCore::HTMLInputElement::setValueFromRenderer(const WebCore::String&))
=================

Please note that this is not just a debug assertion - in release build, pressing return now inserts a carriage return, instead of starting a search.
Comment 1 mitz 2006-07-19 14:37:43 PDT
I have a feeling the fix for bug 9630 will take care of this...
Comment 2 Darin Adler 2006-07-21 19:50:35 PDT
Yes, I think the fix I have in the works will fix this.
Comment 3 Darin Adler 2006-07-21 19:52:26 PDT
Actually, I'm not so sure. This is about inline input.
Comment 4 Darin Adler 2006-07-21 20:38:06 PDT
I don't see the assertion with the Kotoeri input method, for example, but I do see it with Hangul.
Comment 5 Stephanie Lewis 2006-11-06 18:44:35 PST
radar 4822935
Comment 6 Alexey Proskuryakov 2006-12-06 03:53:32 PST
This problem has started with r15429: <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs.

WebCore tries to second-guess the input method, which may or may not let the keypress propagate. This particular heuristic happens to match Kotoeri, but not other IMs, so form submission is performed too late, when two(!) linefeeds are already appended to the value. Potentially, similar problems can affect any keys that are custom processed by WebCore, not just Enter.

For IMs to do their work properly, events first need to be filtered through -[NSResponder interpretKeyEvents:], with the real work being done from NSTextInput callbacks, rather than from keyUp/keyDown. Of course, this can cause lots of issues with HTML events (e.g. whether onkeydown/onkeypress handlers should be called, or whether they can cancel the event).
Comment 7 Joost de Valk (AlthA) 2007-01-19 04:48:20 PST
As bug 9630 which mitz mentioned is fixed, could someone test this one?
Comment 8 Alexey Proskuryakov 2007-01-19 10:56:10 PST
This bug is still present.
Comment 9 Maciej Stachowiak 2007-01-24 01:54:32 PST
I don't see an assertion any more, but submission does still fail with Hangul.
Comment 10 Darin Adler 2007-02-10 22:32:42 PST
Got a fix.
Comment 11 Darin Adler 2007-02-11 12:04:03 PST
Created attachment 13122 [details]
patch that fixes this and two other P1 international input regressions
Comment 12 Oliver Hunt 2007-02-11 18:13:29 PST
Comment on attachment 13122 [details]
patch that fixes this and two other P1 international input regressions

r=me, if you can explain why m_mouseDownEvent is now an NSEvent... Ideally keeping more as PlatformMouseEvent is better... though i can't recall why m_mouseDownEvent is mac only
Comment 13 Darin Adler 2007-02-12 08:40:03 PST
(In reply to comment #12)
> r=me, if you can explain why m_mouseDownEvent is now an NSEvent... Ideally
> keeping more as PlatformMouseEvent is better... though i can't recall why
> m_mouseDownEvent is mac only

I think I'll change m_mouseDown back before landing.
Comment 14 Darin Adler 2007-02-12 11:22:09 PST
Committed revision 19579.