-
-
Notifications
You must be signed in to change notification settings - Fork 482
Description
Description
When using the Jupyter AI Chat UI with a Japanese IME, pressing the Enter key to confirm text conversion immediately sends the message instead of confirming the IME composition.
This makes it difficult to type Japanese text in the chat input field, because pressing Enter during conversion sends the message unintentionally.
This behavior likely affects other IME-based languages such as Chinese or Korean as well.
Reproduce
- Start JupyterLab with Jupyter AI installed
- Open the Jupyter AI Chat panel
- Enable a Japanese IME (e.g. macOS Japanese IME)
- Type Japanese text that requires conversion (e.g.
にほんご) - Press Enter to confirm the conversion
Result:
The message is sent immediately instead of confirming the conversion.
Expected behavior
Pressing Enter during IME composition should only confirm the text conversion and should not send the message.
The message should only be sent when:
- Enter is pressed after composition is finished, or
- a send shortcut (e.g.
Shift+Enter) is used.
Many web chat applications ignore the Enter key while event.isComposing is true.
Context
- Operating System and version: macOS
- Browser and version: Chrome / Safari
- JupyterLab version: (fill here)
This may be related to how Enter key events are handled during IME composition in the chat input component.