Repository navigation
Conversation
houko
force-pushed
the
fix/windows-ime-commit-on-blur
branch
from
November 16, 2026 04:15
3e18a53 to
773f793
Compare
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.
Windows text inputs now commit an active IME composition before focus leaves the field, as Windows' own edit controls do. Before, every way the focus left a composing field cancelled the composition and dropped what the user had composed: a click on another field, the app focusing another view or blurring the field, a modal or alert covering it, the field turning disabled or hidden, UI Automation moving the focus. Now
setFocuscompletes the composition for all of them, so the committedOnChangeandOnCompositionChange{Composing:false}arrive beforeOnBlur. A click inside the composing field itself still commits it before the caret moves, as it did before.TestTestHostCommitsCompositionBeforeBlurcomposes in a field through the IME and then clicks another field, focuses another field from the app (Ref.Focus), or clicks inside the composing field, and checks the events: committed text, composition end, then blur (no blur for the click inside). Machines without an input method skip it.Validation:
go build ./...,go tool nsgo check -target all,GOOS=windowsvet for amd64, 386 and arm64go tool nsgo test ./internal/platform/field,go tool nsgo test -run '^TestInputSelectionKeysAndComposition$' ./core,go tool nsgo test -run 'Layer|Skills|Doc' .input.gothe click-away and app cases fail (focus,composition,end,blur, nothing committed); with this change all three cases pass. The other Windows focus, field and modal tests fail or pass the same with and without the change.