IME composition
React
open
React chat input sends the message on the Enter that confirms an IME conversion
Chat box sends the message on the Enter that confirms an IME candidate
llm-x · mrdjohnson/llm-x
Symptom
Confirming a Japanese IME candidate with Enter in the chat box sends the message instead of committing the conversion.
Minimal repro
1. Open the chat input. 2. With a CJK IME, type a phrase and press Space to get conversion candidates. 3. Press Enter to choose a candidate. 4. The message sends with the unconfirmed text.
Fix
Return early when e.nativeEvent.isComposing is true. React's synthetic KeyboardEvent has no isComposing field, so read it off nativeEvent (the DOM event), not e.isComposing.