desktop
desktop copied to clipboard
fix(input): don't submit on Enter during IME composition
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.tsxAgentPane.tsx(FollowUpInput)Pill.tsxLogsApp.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.
- Guard Enter-to-submit with
Written for commit e25a8b04c90681dddc2f1931a4793a0db4ddbbd1. Summary will update on new commits.