Skip to content

Restore focus when a margin primary control changes - #2715

Merged
leaf-agent merged 1 commit into
mainfrom
fix/ci-38325751994-margin-focus
Oct 13, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/ci-38325751994-margin-focus

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The main CI run found that Undo of a suggestion can leave keyboard focus on the page body. The margin renderer already carries focus when an option changes, but it did not do so when the focused primary control changed from Undo back to Accept. It now passes that primary through the same keyed focus handoff.

The failing browser node reproduced on current main before this change and passes afterward. The neighboring cases for delivery after the user moves focus and Undo while focus is elsewhere also pass, as do 400 runtime tests. This preserves the user's keyboard place without reclaiming focus after a later gesture.

Undo replaces a focused suggestion Undo control with Accept. The margin presentation previously restored focus only when an option was replaced, leaving the user on the body when the primary changed. Carry that primary standing through the same keyed focus restore.
@leaf-agent
leaf-agent merged commit 6b9352e into main Oct 13, 2026
2 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-38325751994-margin-focus branch October 13, 2026 02:26
max-sixty added a commit that referenced this pull request Oct 13, 2026
The eight files that conflicted take main's content with the sweep's edits
re-applied by .tmp/standing/apply.py. #2336 re-indented the code under seven
entries; those entries are now line-local, so a fresh run on 4ce9bc2 applies
with no problems. Its new reads of renamed fields follow the rename: lf-suggestion
and lf-options read the application's per-verb `inForce`, and projection.py names
StateProjection's frozenset fields `absorbed` and `in_force` (with "standing" the
merge of frozen publications called `.items()` on a frozenset).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant