This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 IME Enter still selects autocomplete
With autocomplete open, IME Enter reaches
handleTextareaKeyDownand selects an option before this guard runs. ThedefaultPreventedreturn bypasses the fallback, replacing the IME candidate with an autocomplete choice.Learn more
The shared keydown handler invokes the caller before checking whether Enter belongs to an active IME composition. The chat composer delegates that callback to the open slash-command or file-mention menu. Both menu handlers call
preventDefault()andselectOption()for Enter when choices exist, so control returns to the shared handler withdefaultPreventedset. The shared handler exits before evaluating the newkeyCode === 229fallback.Example: A user types a file mention using a CJK IME while matching files keep the mention menu open. Pressing Enter to confirm the IME candidate selects the highlighted file instead, and the shared composition guard never runs.
Recommended fix: Apply the full composition check before invoking the consumer
onKeyDownfor Enter, or make both autocomplete keydown handlers ignoreisComposingand key code 229 before consuming Enter. Add coverage for IME Enter with each autocomplete menu open.Was this helpful? React with 👍 or 👎 to provide feedback.