Skip to content

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

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

@sawa-zen sawa-zen commented Sep 15, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #49154

Type of change

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

What does this PR do?

In the Desktop question dock (SessionQuestionDock), the custom answer textarea treated Enter/Escape pressed to confirm or cancel IME composition (e.g. Japanese kana-kanji conversion) as commit/dismiss, moving focus out to the option card.

Applies the same isImeComposing pattern used in components/prompt-input.tsx (event.isComposing || composing() || event.keyCode === 229):

  • textarea onKeyDown: early return while IME is composing, before Escape/Enter handling
  • Track composition via onCompositionStart / onCompositionEnd
  • nav (DockPrompt-level keydown): skip reject() on Escape and next() on Cmd/Ctrl+Enter while IME is composing

How did you verify your code works?

Checked against the screen recording in #49154 (focus leaving the inner textbox for the outer option card after conversion confirm). Full app typecheck not run in this environment (sparse checkout, no installed workspace deps); the change follows the existing pattern in prompt-input.tsx.

Screenshots / recordings

See the recording attached to #49154. No new recording attached.

Checklist

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

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:

  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

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

The following comment was made by an LLM, it may be inaccurate:

I found one potentially related PR:

PR #44826: fix(prompt-input): keep the editor inert during IME composition
#44826

This PR is related because it also addresses IME composition handling in the prompt-input component. The current PR (49164) applies the same isComposing pattern from #44826 to the question dock's custom input textarea. Both PRs focus on preventing IME composition keys from being processed as regular input events.

@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