Skip to content

fix(app): skip key handlers during IME composition in question dock#20858

Closed
yykamei wants to merge 1 commit into
anomalyco:devfrom
yykamei:fix/question-dock-ime
Closed

fix(app): skip key handlers during IME composition in question dock#20858
yykamei wants to merge 1 commit into
anomalyco:devfrom
yykamei:fix/question-dock-ime

Conversation

@yykamei
Copy link
Copy Markdown

@yykamei yykamei commented Apr 3, 2026

Issue for this PR

Closes #20850

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The custom answer textarea in SessionQuestionDock does not check event.isComposing before handling Enter, so pressing Enter to confirm a CJK IME candidate submits the answer instead of committing the composed character. This is the same class of bug fixed for LineCommentEditor in #16361.

Added the isComposing || keyCode === 229 early return to both the textarea onKeyDown and the parent nav handler.

How did you verify your code works?

Tested with Japanese IME on macOS (Chrome and Safari). Enter now confirms the IME candidate without submitting the custom answer.

Screenshots / recordings

Same visual behavior as #16360 — IME composition Enter no longer triggers submit.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The custom answer textarea in SessionQuestionDock submits on Enter without
checking whether the browser is in an IME composition session. This causes
CJK users' composition-confirm Enter to be treated as a form submit.

Add the standard isComposing/keyCode-229 early return to both the textarea
onKeyDown and the parent nav handler, matching the pattern already used in
prompt-input.tsx and line-comment.tsx.

Closes anomalyco#20850
@rekram1-node
Copy link
Copy Markdown
Collaborator

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Question dock custom answer textarea submits on IME composition Enter

2 participants