You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Marketplace catalog loses keyboard focus when the header hides below the desktop breakpoint #46146
Open the standalone marketplace at a desktop width (at least 880px).
Scroll until the catalog links are pinned into the header.
Use Tab to focus Plugins or Templates in that header.
Narrow the viewport below 880px, hiding the header catalog slot.
Expected
Focus moves to the equivalent in-flow catalog link, which remains usable on mobile.
Actual
The focused header link disappears and Chromium moves focus to document.body. The catalog links return to the in-flow slot, but keyboard users lose their place. Desktop scroll handoff and mobile-to-desktop resize preserve focus correctly.
Regression evidence
web/app/components/plugins/marketplace/home/__tests__/home-catalog-handoff.browser.spec.tsx, case keeps real catalog links keyboard-operable as the mobile header appears and disappears, reproduces this with real links, native Tab, and actual viewport changes. It will remain it.fails in the test cleanup PR. No production changes are included there.
This points to a focus-capture timing gap: the mobile CSS applies display: none to the header tabs, while updatePinnedState() only captures the focused link when its resize/media-query callback runs. If Chromium has already moved focus to body, getFocusedCatalogTabHref('header') returns null, leaving the layout effect with nothing to restore. That matches the one-way failure you describe. [1][2][3]
A likely fix direction is to track the focused catalog link’s href while the header is still visible, then use that identity for the breakpoint handoff after the content slot becomes non-inert. The existing destination helper already matches by href and uses focus({ preventScroll: true }); the missing piece appears to be preserving the source identity before CSS hides it, rather than changing destination lookup. [2][3]
Hi @hyoban and maintainers — I can take a focused production fix for #46146, separate from the Browser Mode migration in #46148. If nobody is already working on the behavior fix, could you assign this issue to @GYJ99?
I reviewed the issue, current navigation/focus helpers, the linked test PR, the contribution guide, and related PRs. The likely gap is timing: when the desktop header slot becomes hidden below 880px, Chromium may move focus to body before updatePinnedState() reads the focused header link. I'd preserve the focused catalog link's href while it is still visible and restore focus to the corresponding in-flow link after the breakpoint handoff, without forcing focus for unrelated interactions or changing scroll position.
I would use the existing #46148 Chromium it.fails scenario as the regression owner once it lands, verify native Tab and both resize directions, and run focused browser tests plus Web lint/type checks before submitting a PR. This is a source-based plan; I have not claimed a completed local test run. Happy to coordinate if a production fix is already in progress.
Activity
dosubot commentedon Nov 12, 2026
This points to a focus-capture timing gap: the mobile CSS applies
display: noneto the header tabs, whileupdatePinnedState()only captures the focused link when its resize/media-query callback runs. If Chromium has already moved focus tobody,getFocusedCatalogTabHref('header')returnsnull, leaving the layout effect with nothing to restore. That matches the one-way failure you describe. [1] [2] [3]A likely fix direction is to track the focused catalog link’s
hrefwhile the header is still visible, then use that identity for the breakpoint handoff after the content slot becomes non-inert. The existing destination helper already matches byhrefand usesfocus({ preventScroll: true }); the missing piece appears to be preserving the source identity before CSS hides it, rather than changing destination lookup. [2] [3]To reply, just mention @dosu.
Docs are dead. Just use Dosu.
GYJ99 commentedon Nov 12, 2026
Hi @hyoban and maintainers — I can take a focused production fix for #46146, separate from the Browser Mode migration in #46148. If nobody is already working on the behavior fix, could you assign this issue to @GYJ99?
I reviewed the issue, current navigation/focus helpers, the linked test PR, the contribution guide, and related PRs. The likely gap is timing: when the desktop header slot becomes hidden below 880px, Chromium may move focus to
bodybeforeupdatePinnedState()reads the focused header link. I'd preserve the focused catalog link'shrefwhile it is still visible and restore focus to the corresponding in-flow link after the breakpoint handoff, without forcing focus for unrelated interactions or changing scroll position.I would use the existing #46148 Chromium
it.failsscenario as the regression owner once it lands, verify native Tab and both resize directions, and run focused browser tests plus Web lint/type checks before submitting a PR. This is a source-based plan; I have not claimed a completed local test run. Happy to coordinate if a production fix is already in progress.test(web): skip two browser specs that are unstable in CI