[w3c/uievents] Compositionend due to deletion still sends last updated character for Korean on macOS(or macOS IME) and... IME differences (Issue #397)

vlwkaos created an issue (w3c/uievents#397)

Two things I want to address here:
- Compositionend does not gives incorrect information for Korean on macOS
- Problem may lie not on browser-end but on how IME is implemented. What to do about it?

There are two well-known implementation for Korean IME on macOS:

- 3rd party [gureum IME](https://gureum.io/) (I will call it GIME for the ease of mentioning it) 
- macOS native Korean IME

And as far as I know (I've been developing rich-text editor like others), how GIME handles uievents was more on par with current specification. Maybe this is more on macOS bug, but I am unsure how to file a bug report for it.

---

I was looking for a way to distinguish between deleteion during composition update and input during composition update. And found out that it was difficult to do so because of how events are all differently handled for all three browsers. The most cumbersome thing was, compositionend event sending last character before deletion. Note that this does not happen with Chinese or Japanese.

But when I tried another IME, GIME (which is actually my daily driver), browser event order was more on par with the specification(albeit not perfect). But given that most people will use macOS builtin IME this should be addressed.

A question that comes to my mind now is that even when browsers follow the specification and guideline, there could be other factors that alter the behavior critically. It is somewhat similar to this issue #395 I think. 
How do we mandate the specification(and implementation thereof) that regardless of IME implementation, the browsers work consistently?

Below are my investigations:
I typed `ㅇ` then, simply deleted it with <kbd>Backspace</kbd> key. 
The logs are from `keydown` until `keyup` for <kbd>Backspace</kbd> key.

---

macOS / Chrome 136.0.7103.114 / 2-Set Korean (IME)

<img width="1300" alt="Image" src="https://github.com/user-attachments/assets/8074e5bc-8fe9-4206-818b-2e6f6fbb8759" />

macOS / Firefox 139.0b10 (aarch64) / 2-Set Korean (IME)

<img width="1300" alt="Image" src="https://github.com/user-attachments/assets/00bddb17-3457-4140-8435-a751d6226bfa" />

macOS / Safari Version 18.4 (20621.1.15.11.10) / 2-Set Korean (IME) : it fires replacementText input event

<img width="1384" alt="Image" src="https://github.com/user-attachments/assets/93a39811-ee39-45c1-a206-b68b2438422c" />

---

macOS / Chrome 136.0.7103.114 / GIME

<img width="1300" alt="Image" src="https://github.com/user-attachments/assets/3df40c76-9828-4109-85c6-dc4af4343a43" />

macOS / Firefox 139.0b10 (aarch64) / GIME

<img width="1300" alt="Image" src="https://github.com/user-attachments/assets/e98078d2-59e4-44e2-b62d-a5e0d6069962" />

macOS / Safari Version 18.4 (20621.1.15.11.10) / GIME

<img width="1345" alt="Image" src="https://github.com/user-attachments/assets/1e02b975-ae36-4919-9a37-eb5bd84eef46" />


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/397
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/397@github.com>

Received on Thursday, 5 June 2025 08:30:27 UTC