Skip to content

Enter key during Japanese IME composition sends message in Chat UI #1534

@MRyutaro

Description

@MRyutaro

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

  1. Start JupyterLab with Jupyter AI installed
  2. Open the Jupyter AI Chat panel
  3. Enable a Japanese IME (e.g. macOS Japanese IME)
  4. Type Japanese text that requires conversion (e.g. にほんご)
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions