Repository navigation
Conversation
commit: |
jjenzz
marked this pull request as ready for review
October 12, 2026 12:59
jjenzz
requested review from
atomiks,
colmtuite,
flaviendelangle and
michaldudak
as code owners
October 12, 2026 12:59
Bundle size
PerformanceTotal duration: 471.25 ms -66.58 ms(-12.4%) | Renders: 76 (+0) | Paint: 865.29 ms -100.74 ms(-10.4%)
11 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
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.
In #5967, Escape stops dismissing a popup after Chromium abandons an IME composition without emitting compositionend. This change restores dismissal after that abandoned composition while continuing to protect Escape used by an active IME.
An Input Method Editor (IME) lets someone enter text such as Japanese or Chinese using a Latin keyboard. A composition is the temporary editing stage before that text is committed—for example, typing a pronunciation and choosing the intended characters. During this stage, Escape can cancel the composition, so it should not also dismiss the popup. MDN's composition event explanation and interactive example shows how this works in the browser.
Closes #5967
Root cause and solution
The dismissal handler records compositionstart and assumes compositionend will clear that state. Removing the composing input or rewriting its contents can omit the end event, leaving the flag set indefinitely. Every later Escape is then treated as composition input.
Active composition is now identified from the keyboard event's isComposing or keyCode === 229 indicators. The start listener and its unbounded flag are removed. The existing self-expiring compositionend suppression window remains, preserving the Safari end-before-key safeguard.
The event describes the current Escape, so an abandoned composition cannot leave stale state behind. Clearing the old flag only when an input disconnects would miss aborts caused by rewriting a connected input. Relying exclusively on native flags would discard the existing Safari timing protection. The selected solution handles both without DOM observers, mutation interception, or consumer coordination.
Validation
Public APIs and controlled dismissal/cancellation behavior are unchanged. The keyCode === 229 guard follows the existing Base UI input/list handling.