Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial committing composition definition is more complicated than actual implementations #87

Open
masayuki-nakano opened this issue Nov 10, 2018 · 5 comments

Comments

@masayuki-nakano
Copy link

6. . Event order during IME composition defines partial committing composition case at 6 and the following NOTE.

  1. If only a part of the composition string was committed to the DOM, while another part is not yet to be committed, the process starts over from step 3 with the non-committed part of the final composition string as the new initial composition string.

NOTE
Note that while every composition only has one compositionstart event, it may have several compositionend events.

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.

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 and compositionstart 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.)

@johanneswilm
Copy link
Contributor

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?

@masayuki-nakano
Copy link
Author

No, I meant that should restart from point 2, i.e., with compositionstart.

@johanneswilm
Copy link
Contributor

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 w3c/uievents#202 ?

@masayuki-nakano
Copy link
Author

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...

@johanneswilm
Copy link
Contributor

Ok, but it's closely related. The thing about multiple compositionend events is discussed starting here: w3c/uievents#202 (comment) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants