Skip to content

fix: carry focus out of inert closing thread cards - #4134

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-4123
Oct 25, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-4123

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

A returning diff thread could leave keyboard focus on the body because its margin card's Close button remained painted during the closing fade added in #4001. The focus hold accepted that inert control as its completed destination, before the browser blurred it.

The shared focus-place reading now excludes inert content through composed ancestry. Its inertness reader moves to the dependency-free tree module and remains shared with exposure and keyboard routing. The card keeps its fade, and focus moves to the thread's new seat.

The reported Close case failed on current main; both Close and marker now pass. A focused runtime regression fails with the old reading and passes with this change. Eight browser cases covering thread and reply transfers pass, as do all 563 runtime checks and the browser build.

A served review-a-fix comparison against the base completed document arrival, widget upgrade and state presentation without console errors on both arms. Before presentation each loaded 53 requests (47 code requests); candidate code grew by 133 bytes, including 43 JavaScript bytes. The added focus availability reading prevents retaining a retired control.

Closes #4123 — automated triage

The margin card fade introduced in #4001 keeps Close painted and briefly focused after the card becomes inert. The focus hold accepted that retired control, then the browser blurred it after the handoff had finished. Exclude composed inert ancestry from the shared focus-place reading, using the same inertness rule as exposure and keyboard routing.

The reported Close case fails on main and both Close and marker pass with this change. A runtime regression also fails before and passes after; eight focused browser cases and all 563 runtime checks pass.

Closes #4123
@leaf-agent
leaf-agent merged commit dd5eb22 into main Oct 25, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4123 branch October 25, 2026 21:32
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.

Returning diff thread loses focus from its margin card Close control

1 participant