Bug Description
In the new Assistant UI (assistant.kagi.com), pressing Enter while using Japanese IME
skips the composition confirmation step and immediately submits the message.
Steps to Reproduce
- Open the new Kagi Assistant UI
- Switch to Japanese IME (e.g. macOS Japanese input, Google Japanese Input)
- Type Japanese text (e.g. "こんにちは")
- Press Enter to confirm the IME composition
- Expected: IME composition is confirmed, text remains in the input field
- Actual: Message is submitted immediately, skipping IME confirmation
Environment
- Browser: Safari
- OS: macOS
- IME: macOS Native IME
Notes
- This issue is specific to the new Assistant UI
- The
event.isComposing check appears to be missing from the keydown handler
- Similar issue existed in the old UI but was previously fixed (regression)
When pressing Enter while the IME is in composing state, the Enter key should confirm the IME composition first, not submit the message. The message should only be submitted when Enter is pressed after the composition is already confirmed (i.e., when event.isComposing is false).