Bug 29391

Summary: [Qt] QtWebKit: ESC key does not clear the text of the line edit when canceling an input method
Product: WebKit Reporter: Tor Arne Vestbø <vestbo>
Component: FormsAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: ap, commit-queue, eric, jberlin, jhanssen, jturcotte
Priority: P3 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Tor Arne Vestbø 2009-09-18 07:15:20 PDT
This bug report originated from issue QTBUG-2580
<http://bugreports.qt.nokia.com/browse/QTBUG-2580>

--- Description ---

When using the 'scim' (and possibly others) input method to enter text into a QLineEdit, the normal behavior is that pressing the 'Esc' key will close the input method and clear the text. This works in normal line edits, but does not work properly when entering the text in a line edit on a webpage because the input method is closed, but the text is not cleared.
Comment 1 Jocelyn Turcotte 2010-03-17 11:17:11 PDT
Reproduced on Windows 7 IME with Qt 4.7 and WebKit r55520

I'm setting the priority by guessing to P3, I don't use IME often so if somebody confirms that this can be annoying we can reevaluate the priority.
Comment 2 Jan Erik Hanssen 2010-12-17 17:15:01 PST
Created attachment 76926 [details]
Patch

The problem is that the composition text is never cleared while it should be when the editor is in composition mode and an empty QInputMethodEvent is received
Comment 3 Alexey Proskuryakov 2010-12-17 17:21:47 PST
Can a regression test be added for this? We have some ways to simulate input method behavior in DumpRenderTree, although I don't know if those work with Qt.
Comment 4 Jan Erik Hanssen 2010-12-22 12:41:05 PST
Created attachment 77250 [details]
Patch

Change the Qt test case to a generic one
Comment 5 Alexey Proskuryakov 2010-12-23 17:03:07 PST
Comment on attachment 77250 [details]
Patch

Thanks for making a nice regression test!
Comment 6 WebKit Commit Bot 2010-12-23 18:53:54 PST
Comment on attachment 77250 [details]
Patch

Clearing flags on attachment: 77250

Committed r74605: <http://trac.webkit.org/changeset/74605>
Comment 7 WebKit Commit Bot 2010-12-23 18:54:00 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Jessie Berlin 2010-12-24 10:49:28 PST
The new test should also have been added to the skip list for Windows, since DRT's textInputController is unimplemented on Windows: https://bugs.webkit.org/show_bug.cgi?id=32021

I will land the change to the windows skip list shortly.
Comment 9 Jessie Berlin 2010-12-24 10:55:28 PST
Committed the change to the Windows Skip list in r74641:
http://trac.webkit.org/changeset/74641
Comment 10 Eric Seidel (no email) 2010-12-28 20:40:08 PST
Chromium is fixing their port to match this test in bug 51693.