Skip to content

fix(app): ignore IME composition keys in question dock custom input - #49155

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

sawa-zen wants to merge 1 commit into
anomalyco:devfrom
sawa-zen:fix/question-dock-ime-focus

Conversation

@sawa-zen

Copy link
Copy Markdown

Fixes #49154.

In the Desktop question dock (SessionQuestionDock), the custom answer textarea treated every Enter/Escape keydown as commit/dismiss — including the keystrokes used to confirm or cancel IME composition (e.g. Japanese kana-kanji conversion with Google Japanese Input). As a result, confirming a conversion moved focus out of the input to the option card, interrupting continuous Japanese input.

This mirrors the existing isImeComposing pattern from components/prompt-input.tsx (event.isComposing || composing() || event.keyCode === 229, with explicit composition tracking for platforms where compositionend fires before the confirming Enter):

  • textarea onKeyDown: return early while IME is composing, before the Escape/Enter handling.
  • Track composition via onCompositionStart/onCompositionEnd.
  • nav (DockPrompt-level keydown): don't reject() on Escape or advance on Cmd/Ctrl+Enter while IME is composing (keydowns bubble up from the textarea).

Verified against the screen recording attached to #49154 (focus leaving the inner textbox for the outer option card after conversion confirm). I could not run the full app typecheck in this environment (sparse checkout, no installed workspace deps); the change follows the exact pattern already used in prompt-input.tsx.

Pressing Enter or Escape to confirm/cancel IME composition (e.g. Japanese kana-kanji conversion) in the question dock's custom answer textarea was treated as commit/dismiss, moving focus out of the input to the option card. Guard key handlers with the same isImeComposing pattern used in prompt-input.tsx.

Fixes anomalyco#49154
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 15, 2026
@github-actions github-actions Bot closed this Sep 15, 2026
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.

[Bug] Desktop question UI: Japanese IME confirm moves focus from custom input to option card

1 participant