desktop icon indicating copy to clipboard operation
desktop copied to clipboard

fix(input): don't submit on Enter during IME composition

Open dim0627 opened this issue 5 months ago • 0 comments

Summary

Pressing Enter to confirm an IME conversion (Japanese/CJK) was being treated as "send", submitting half-converted text and making the app unusable for IME input.

Fix

Guard the Enter-to-submit handlers with !e.nativeEvent.isComposing && e.keyCode !== 229 across all prompt inputs:

  • TaskInput.tsx
  • AgentPane.tsx (FollowUpInput)
  • Pill.tsx
  • LogsApp.tsx

isComposing is the standard signal; keyCode === 229 covers IMEs/browsers that fire a synthetic key during composition. ChatTurn.tsx uses Cmd/Ctrl+Enter and is unaffected.

Test plan

  • With a Japanese IME: type + convert + Enter → conversion is confirmed, message is NOT sent.
  • Press Enter on confirmed text → message sends as before.
  • Shift+Enter still inserts a newline.

Closes #445


Summary by cubic

Stop submitting on Enter during IME composition so conversion confirms without sending. Fixes #445.

  • Bug Fixes
    • Guard Enter-to-submit with !e.nativeEvent.isComposing && e.keyCode !== 229.
    • Applied to TaskInput, AgentPane FollowUpInput, Pill, and LogsApp.
    • Shift+Enter still inserts a newline; ChatTurn’s Cmd/Ctrl+Enter remains unchanged.

Written for commit e25a8b04c90681dddc2f1931a4793a0db4ddbbd1. Summary will update on new commits.

Review in cubic

dim0627 avatar Jun 13 '26 04:06 dim0627