Skip to content

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

Open
dim0627 wants to merge 1 commit into
browser-use:mainfrom
dim0627:fix/ime-composition-enter
Open

fix(input): don't submit on Enter during IME composition#446
dim0627 wants to merge 1 commit into
browser-use:mainfrom
dim0627:fix/ime-composition-enter

Conversation

@dim0627

@dim0627 dim0627 commented Jun 13, 2026

Copy link
Copy Markdown

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 e25a8b0. Summary will update on new commits.

Review in cubic

Enter pressed to confirm an IME (Japanese/CJK) conversion candidate was
being treated as 'send', submitting half-converted text and making the
app unusable for IME input. Guard the Enter-to-submit handlers with
isComposing (and keyCode 229 as a fallback) across all prompt inputs:
TaskInput, AgentPane FollowUpInput, Pill, and LogsApp.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

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 composition Enter is treated as "send" (Japanese/CJK input unusable)

1 participant