Open masayuki-nakano opened 6 years ago
However, as far as I've tested, Firefox, Chrome and Safari does not handle partial commit as such. All of them commits (long) composition with only partial committed string. Then, restart composition with compositionstart event and compositionupdate event with remaining composing string.
Isn't that the same thing point 6 says?
No, I meant that should restart from point 2, i.e., with compositionstart
.
Ah I see. This was actually the case at one stage - one compositionstart could have several compositionend events. Isn't this issue a duplicate of https://github.com/w3c/uievents/issues/202 ?
No, it's issue about event order between input
and compositionend
. Well, on the other hand, the issue is important for #49. I suggested to insert compositionend
into a pair of beforeinput
and input
...
Ok, but it's closely related. The thing about multiple compositionend
events is discussed starting here: https://github.com/w3c/uievents/issues/202#issuecomment-407601959 .
6. . Event order during IME composition defines partial committing composition case at 6 and the following NOTE.
However, as far as I've tested, Firefox, Chrome and Safari does not handle partial commit as such. All of them commits (long) composition with only partial committed string. Then, restart composition with
compositionstart
event andcompositionupdate
event with remaining composing string.I believe that current browser implementation makes more sense because web apps do not need to support partial commit by themselves and web apps can now composing range only with retrieving selected range at
compositionstart
.So, there is no problem with defining
compositionend
andcompositionstart
are always pair.I tested with "live conversion mode" of Apple Japanese Input and ATOK on macOS (but IIRC, on Windows, same result).
(And I guess that IME vendors need to implement as so for compatibility with all existing IME-aware native applications. Windows API has partially committed composition string representation with treating committed part as "fixed" clauses. However, I've never meet such IME even though I work on maintaining IME handler of Gecko for more a decade.)