Repository navigation
fix: wait for native focus transfers before publishing departure - #4441
Closed
leaf-agent wants to merge 1 commit into
Closed
leaf-agent wants to merge 1 commit into
leaf-agent wants to merge 1 commit into
Conversation
Native focusout listeners checkpoint microtasks before focusin. Reading body focus there folded disclosed suggestion actions during the Reject press. Read named transfer outcomes before the next paint and let newer publications supersede them, while preserving the failed-arrival handling from #4406. Departures without a destination retain their microtask reading. Both reported decision/undo browser journeys fail before and pass after the repair; restoring the focus reader before #4406 also makes them pass. Press-away and page-word focus-hold checks, all 683 runtime tests, and the browser build pass. The focus regressions await the rendering queue they exercise. Closes #4424
Collaborator
Author
|
Superseded by #4439, which fixes the same native focus-transfer cause for #4427. This investigation independently reproduced #4424's two decision/undo failures and traced them to #4406; I am verifying those cases against #4439 and will carry the evidence there. Closing this duplicate without deleting its branch. |
This was referenced Oct 27, 2026
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.
Native pointer focus transfers run a microtask checkpoint between
focusoutandfocusin. #4406 began reading named transfers at that checkpoint, mistaking temporary body focus for a departure. A folded suggestion then hid Reject during its own press, so no decision event was sent.Read a named transfer's outcome in the existing rendering queue before the next paint, and discard the reading if a newer focus publication supersedes it. Actual departures to nowhere retain their microtask reading. This preserves #4406's failed-component-arrival handling while keeping a disclosed pin open as focus moves between its controls; pressing Reject records the decision, and Undo restores the suggestion and its pins.
Both reported browser tests fail on main and pass with the repair. They also pass with just the focus reader restored to its version before #4406, confirming the introducing change. The pin's mouse/touch press-away and keyboard Escape check, the page-word focus-hold check, and all 683 runtime tests pass. The failed-arrival runtime regression remains green; a new regression covers a successful arrival superseding a deferred departure. The committed kernel is rebuilt.
The change adds one scheduling choice at the shared focus boundary and uses its existing publication sequence to cancel stale work. This fixes native transfers for every focus consumer without changing the margin's disclosure rules.
Closes #4424 — automated triage