Skip to content

SessionQuestionDock custom answer commits when pressing Enter to confirm IME composition #21889

Closed as duplicate

Description

@hoshiumiarata

Description

When using a CJK (Chinese/Japanese/Korean) IME in OpenCode, pressing Enter to confirm an IME candidate selection in the custom answer textarea inside SessionQuestionDock unintentionally commits the custom answer and exits editing mode.

The root cause is that the onKeyDown handler for the custom answer textarea in SessionQuestionDock did not check event.isComposing (or the legacy event.keyCode === 229 for Safari), so the Enter key fired during IME composition was treated as a commit action.

Plugins

No response

OpenCode version

1.4.3

Steps to reproduce

  1. Open a session that shows a question request with a custom answer option
  2. Click the custom answer option so the textarea opens
  3. Enable a CJK input method
  4. Start typing characters so IME composition begins
  5. Press Enter to confirm the IME candidate

Screenshot and/or share link

before_fix.mov

Operating System

macOS

Terminal

No response

Activity

  1. github-actions commented on Apr 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions