Skip to content

fix: #1250 ignore a tab key when choosing a candidate of letters by IME - #3544

Closed
mosaicer wants to merge 1 commit into
marktext:developfrom
mosaicer:fix_issue_1250
Closed

mosaicer wants to merge 1 commit into
marktext:developfrom
mosaicer:fix_issue_1250

Conversation

@mosaicer

@mosaicer mosaicer commented Jan 4, 2023

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
Breaking changes? no
Deprecations? no
New tests added? not needed
Fixed tickets Fixes #1250
License MIT

Description

Skip processing in tabHandler when choosing a candidate of letters by IME.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an IME interaction bug in Muya’s Tab key handling so Tab doesn’t trigger editor tab-insertion logic while an IME composition is active (addressing #1250).

Changes:

  • Add an early return in ContentState.prototype.tabHandler when event.isComposing is true to skip Tab processing during IME composition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +305 to +309
// skip subsequent processing if IME is working
if (event.isComposing) {
return
}

@Jocs

Jocs commented May 15, 2026

Copy link
Copy Markdown
Member

This project recently merged a large refactor (electron-vite migration, PR #4001) that upgraded dependencies and fixed several issues.

Please review this PR and let us know if it is still needed, or if the changes have already been addressed upstream.

@Jocs

Jocs commented May 18, 2026

Copy link
Copy Markdown
Member

@mosaicer Pls resolve this Copilot review issue if necessary.

@Jocs

Jocs commented May 20, 2026

Copy link
Copy Markdown
Member

Thank you for the contribution. After review, this change is no longer needed: the IME-composition guard is already in place in src/muya/lib/contentState/tabCtrl.js (if (event.isComposing) return), which prevents the Tab key from being consumed while choosing an IME candidate (fixing #1250).

Closing for now to keep the PR queue tidy. If you can still reproduce the issue on the current develop branch, please feel free to open a new PR — we'd be happy to review it.

@Jocs Jocs closed this May 20, 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.

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

3 participants