Skip to content

fix(muya): leave Tab to the IME during composition - #4753

Merged
Jocs merged 1 commit into
developfrom
fix/1250-ime-tab-composition
Jun 26, 2026
Merged

Jocs merged 1 commit into
developfrom
fix/1250-ime-tab-composition

Conversation

@Jocs

@Jocs Jocs commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Pressing Tab to cycle IME candidates (e.g. Japanese input) inserted editor indentation instead of reaching the IME.

keydownHandler (content.ts) guards Enter and the arrow keys with !this.isComposed, but the Tab case had no such guard. During an active composition session (isComposed === true), Tab still ran tabHandler, which calls event.preventDefault() unconditionally and inserts indentation — so the IME never saw the keystroke. Added the same !isComposed guard to the Tab case.

Verification

Unit test src/block/base/__tests__/imeTabComposition.spec.ts, proven RED→GREEN:

  • composing → tabHandler is not called, no preventDefault, text unchanged
  • not composing → tabHandler runs as before

141 related keydown/tab/arrow/autopair specs still pass; conformance lock unchanged.

Fixes #1250

keydownHandler guarded Enter and the arrow keys with !isComposed but not
Tab, so pressing Tab to cycle IME candidates (e.g. Japanese input) ran
tabHandler and inserted indentation instead of reaching the IME. Guard
the Tab case the same way.

Fixes #1250

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Jocs
Jocs merged commit 2e6bcf7 into develop Jun 26, 2026
7 checks passed
@Jocs
Jocs deleted the fix/1250-ime-tab-composition branch October 23, 2026 08:32
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.

When I type Japanese text, use of a tab key for letter selection inserts 4 spaces

1 participant