Skip to content

fix: wait for native focus transfers before publishing departure - #4441

Closed
leaf-agent wants to merge 1 commit into
mainfrom
fix/issue-4424
Closed

leaf-agent wants to merge 1 commit into
mainfrom
fix/issue-4424

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Native pointer focus transfers run a microtask checkpoint between focusout and focusin. #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

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
@leaf-agent

Copy link
Copy Markdown
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.

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.

Suggestion Reject presses send no event after decision and undo

1 participant