IME composition spec cited open

insertCompositionText / isComposing can't single out the IME commit input event

insertCompositionText and isComposing cannot single out the commit input event

w3c/input-events · w3c/input-events

Symptom

Every input event during a composition, including the one that commits it on Enter, carries isComposing=true and inputType insertCompositionText, so code cannot detect the commit without also listening for compositionend.

Minimal repro
Type s, i, Space to convert to a kanji, change the candidate, then press Enter to commit; the input events for each step are indistinguishable.
Fix

Assign a distinct inputType (or property) to the input event that commits the composition.

Upstream issue → #input-events-insertcompositiontext

Also in: Web platform specs

← all 93 entries