Skip to content

bug(webchat-v2): Enter sends the message while confirming IME composition #8091

Description

@supermomonga

Summary

In WebChat v2, pressing Enter to confirm an IME conversion also sends the chat message. The keypress is intended to finish composing text, not to submit the message, so an unfinished message is sent before I am ready.

This appears to be a recurrence of the user-visible behavior previously addressed in the old web UI. It does not establish that the underlying cause is identical.

Steps to reproduce

  1. Open the WebChat v2 chat screen and focus the message input.
  2. Start composing text with an IME, such as Japanese input, and leave the conversion unconfirmed.
  3. Press Enter to confirm the current conversion.

Actual behavior

The message is submitted when Enter is used to confirm the IME conversion.

Expected behavior

Enter consumed by IME composition should only confirm the conversion and leave the message in the input. A subsequent Enter outside composition should send the message normally. Shift+Enter should continue to insert a newline.

Related history

This report tracks the behavior in WebChat v2 separately from the closed issue for the old UI.

Current code observation

In the current main implementation, the Enter-to-send branch in chat-input.tsx calls preventDefault() and then handleSend() after checking whether sending is disabled. The keyboard handler has no IME composition guard.

This is a source inspection finding; it has not been verified with a browser event trace.

Reference and validation

GoogleChrome modern-web-guidance: IME-safe enter-to-submit describes this failure mode and the Safari-specific event-ordering caveat.

A fix should ensure that IME confirmation does not submit or interfere with composition, while preserving normal Enter submission and Shift+Enter newlines. Verification should include real IME input in supported browsers, including Safari where applicable.

Environment

  • Affected interface: WebChat v2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions