You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Adding characters before the cursor while composing with IME results in offset of characters from IME #1472
hit Enter key to have the IME insert composed characters
As a result, the inserted characters appear before where they are expected.
They looks like being inserted using the original number of characters from the beginning of the document, regardless of the inserted characters.
This may result in some trouble in, for example, a collaborative editor application where multiple users concurrently write something.
This happened with Google Chrome 131.0.6778.70 and Microsoft Edge 131.0.2903.48, with Google 日本語入力 and Microsoft IME.
This is an example with Google Chrome:
2024-11-15.085747.mp4
On the other hand, this didn't happen on Firefox 132.0.2:
It seems I was expecting too much from Chrome's EditContext implementation. I've opened an issue about it, but that will probably not get addressed all that quickly. So I'm going to see if I can work around this in the library for the time being.
Activity
marijnh commentedon Nov 15, 2024
It seems I was expecting too much from Chrome's
EditContextimplementation. I've opened an issue about it, but that will probably not get addressed all that quickly. So I'm going to see if I can work around this in the library for the time being.marijnh commentedon Nov 15, 2024
Attached patch kludges around this until this is handled better on the browser's side.
See also w3c/edit-context#111
Clip context positions to the size of the edit context
Freeze the edit context when non-typing changes come in during compos…