Repository navigation
fix: let native focus transfers finish before reading departures - #4439
Conversation
A pointer-driven focus transfer checkpoints microtasks between blur and focus. Reading the body there falsely published a departure and folded margin options under a held press. Read at the next task and discard readings superseded by a newer arrival, preserving failed-entry cleanup from #4406. The retained margin action test also checks focus and disclosure during the held press. Closes #4427
|
This also fixes #4425. Its exact reproduction, I closed the concurrently opened duplicate #4440 in favor of this PR. Its branch preserves a small runtime regression that models the microtask gap if useful; this PR's existing browser coverage already exercises the native transfer. The session driving this PR owns its CI and landing; #4425 can close with this repair. |
|
This also fixes #4426. Its three reported browser tests fail on main with a hidden thread preview and pass against this PR at Additional verified cases
Run together with |
|
This also fixes #4423. The exact reproduction, The captured sequence opens the options and focuses Accept, then the departure reader sees temporary body focus during native touch activation and folds them. This PR's shared focus correction addresses that opening failure while the same test still exercises drag retention, touch/mouse dismissal and keyboard Escape. I discarded my concurrent local repair rather than open another PR. This PR's driving session owns CI and landing; #4423 can close with this repair. |
|
This also fixes #4424. I reproduced both reported failures on main: With this PR's focus reader at Please include #4424 in this fix's closure. I closed the independently opened duplicate #4441; this PR's existing review and CI work own the remaining landing decision. |
# Conflicts: # dist/kernel/kernel.json
A native pointer focus transfer checkpoints microtasks between departure and arrival. #4406's deferred departure check could read the body in that gap and fold the margin options under a held press, excluding the retained action from the accessibility tree despite its correct label.
Read the departure after the focus task finishes and discard it when a newer location reading has superseded it. This preserves #4406's failed-arrival cleanup while keeping the options open and the retained action focused through the press and label update. The existing browser regression now explicitly checks that intermediate focus and disclosure state.
Validation: the reported test fails before the change and passes afterward; all 682 runtime tests pass, including failed-arrival cleanup. The review-a-fix stale-shortcut sweep, inline-margin retention case and three focused focus cases pass. The kernel build/type check passes. Local ESLint, Prettier and Ruff executables are unavailable; CI will run lint.
A served review-a-plan startup comparison retains 31 code requests through widget upgrade and first server-state presentation, with 148 more code bytes and no console errors or startup layout shifts. The change adds no startup task or dependency.
Parallel triage sessions reproduced and verified the same correction for suggestion presses, keyboard arrival and thread-preview opening in #4423, #4424, #4425 and #4426; their exact cases and head-pinned results are recorded in the PR comments.
Closes #4423, closes #4424, closes #4425, closes #4426, closes #4427 — automated triage