Skip to content

fix(desktop): don't submit on IME confirm Enter#2632

Merged
esengine merged 1 commit into
esengine:main-v2from
dcs02280653-collab:codex/reasonix-ime-enter
Jun 2, 2026
Merged

fix(desktop): don't submit on IME confirm Enter#2632
esengine merged 1 commit into
esengine:main-v2from
dcs02280653-collab:codex/reasonix-ime-enter

Conversation

@dcs02280653-collab
Copy link
Copy Markdown
Contributor

The desktop composer still had an IME edge case: confirming text with Enter can sometimes look like a normal Enter key press.

This can happen when the keydown arrives just after compositionend, or when the browser reports the IME key event as keyCode === 229. In that case, pressing Enter to confirm text with a CJK IME may submit the prompt, or pick the active slash/@ menu item, instead of just committing the text.

This change keeps a small grace window after composition ends and treats keyCode === 229 as IME input. The guard runs before the composer handles Enter for menu picks or submit.

Related: #1645, #1689
Not the same path as #2297, which is about the Ink/TUI input.

Checked:

  • npm --prefix desktop/frontend run typecheck
  • npm --prefix desktop/frontend run build

Manual check:

  • Use a CJK IME in the desktop composer.
  • Type an ASCII candidate, for example github.
  • Press Enter once to confirm the candidate.
  • The text should stay in the composer and should not be submitted.
  • Press Enter again outside composition; normal submit still works.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 1, 2026
@esengine esengine merged commit c01ce22 into esengine:main-v2 Jun 2, 2026
1 check passed
esengine pushed a commit that referenced this pull request Jun 2, 2026
Follow-up to #2632. The grace window only needs to span the same Enter
straddling compositionend (a few ms); 250ms also swallowed a deliberate
quick second Enter meant to submit.
@dcs02280653-collab dcs02280653-collab deleted the codex/reasonix-ime-enter branch June 2, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants