Skip to content

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

@hoshiumiarata

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions