54 IME Composition Buffer. 54 of 95.
54/INPUT/54 of 95
IME Composition Buffer
Composing text is not yet committed text.
The problem
Validating or searching on every keystroke during IME composition fires on intermediate characters that are not yet committed.
The solution
Composition buffer defers commit until compositionend fires.
Experiment
Play with the values
How it works
- compositionstart marks the beginning of an IME composition, which is not a committed character yet.
- Intermediate text is buffered while the user is still choosing a candidate.
- Live validation and search skip that buffer so partial syllables do not fire.
- The interface waits for compositionend before treating the text as final.
- Only then does the string commit and downstream search or validation run.
Seen in
CJK search
Japanese, Chinese, and Korean IME drafts do not spam the search API.
Username fields
Availability checks wait until composition commits a final string.
Mention typeahead
Filters update after composition ends, not mid-candidate.
Form validation
Errors wait for committed text instead of flashing on draft glyphs.