Skip to content

fix: preserve IME composition in Enter handlers - #471

Open
hugosmoreira wants to merge 1 commit into
google:mainfrom
hugosmoreira:agent/fix-ime-enter-guards
Open

fix: preserve IME composition in Enter handlers#471
hugosmoreira wants to merge 1 commit into
google:mainfrom
hugosmoreira:agent/fix-ime-enter-guards

Conversation

@hugosmoreira

Copy link
Copy Markdown

Summary

  • pass keyboard events to every non-chat Enter submission handler
  • ignore Enter while an IME composition is active, including the keyCode === 229 fallback used by the existing chat input
  • add a shared utility and regression coverage for composition and regular Enter events

Why

The main chat already protects CJK IME composition, but dialog and human-in-the-loop inputs still submitted when Enter was used to confirm a conversion candidate. This could send incomplete Japanese, Chinese, or Korean text.

Root cause

The affected Angular templates invoked their submit handlers without $event, so the handlers could not inspect isComposing.

Testing

  • npm test -- --watch=false --browsers=ChromeHeadlessCI — 585 tests passed
  • focused utility and dialog regression tests — 11 tests passed
  • npm run build — passed

Fixes #469

@hugosmoreira
hugosmoreira marked this pull request as ready for review July 27, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IME conversion Enter still submits prematurely in dialogs and long-running (HITL) response input — chat-input fix from #44/#80 not applied

1 participant