Closed
Bug 724471
Opened 13 years ago
Closed 13 years ago
[IMM] two sets of composition events are fired for a composition of Korean IME
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod)
Attachments
(1 file)
2.27 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
When I commit composition string of Korean IME on Win7, by space key, it causes strange DOM composition events.
First, the composition is committed by empty string. Next, composition restarts and is committed with the latest composition string. So, web applications see two composition for an actual composition.
The cause is, nsIMM32Handler has a hack for Korean IME which was implemented by an ancient bug (forgot the bug #). Korean IME sends WM_IME_ENDCOMPOSITION first, after that, sends WM_IME_COMPOSITION. It caused doubling the composition string at committing. For preventing that, current our code dispatches an empty text event and compositionend event at WM_IME_ENDCOMPOSITION.
This strange behavior can be confirmed on Win7 too. I think that WM_IME_ENDCOMPOSITION should check the message queue if there is WM_IME_COMPOSITION. If there is, we should ignore the WM_IME_ENDCOMPOSITION.
Assignee | ||
Comment 1•13 years ago
|
||
> The cause is, nsIMM32Handler has a hack for Korean IME which was implemented by an ancient bug (forgot the bug #).
Maybe, it's bug 12253. The original code was landed for the bug and bug 17710 and bug 18286.
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsWindow.cpp&branch=&root=/cvsroot&subdir=mozilla/widget/src/windows&command=DIFF_FRAMESET&rev1=3.218&rev2=3.219
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #594714 -
Flags: review?(VYV03354)
Comment 3•13 years ago
|
||
Comment on attachment 594714 [details] [diff] [review]
Patch
> + if (::PeekMessageW(&compositionMsg, aWindow->GetWindowHandle(),
> + WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION,
> + PM_NOREMOVE) &&
> + compositionMsg.message == WM_IME_COMPOSITION) {
Please also test |IS_COMMITTING_LPARAM(compositionMsg.lParam)|.
r=me with this.
Attachment #594714 -
Flags: review?(VYV03354) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Whiteboard: [inbound]
Target Milestone: --- → mozilla13
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in
before you can comment on or make changes to this bug.
Description
•