Repository navigation
fix(muya): leave Tab to the IME during composition - #4753
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 rantabHandler, which callsevent.preventDefault()unconditionally and inserts indentation — so the IME never saw the keystroke. Added the same!isComposedguard to the Tab case.Verification
Unit test
src/block/base/__tests__/imeTabComposition.spec.ts, proven RED→GREEN:tabHandleris not called, nopreventDefault, text unchangedtabHandlerruns as before141 related keydown/tab/arrow/autopair specs still pass; conformance lock unchanged.
Fixes #1250