Fix #477: menu focus-first-item #478

Merged
crueber merged 1 commit from fix/issue-477 into main 2026-09-13 19:09:16 +00:00
Owner

Fixes #477. Both navbar menus (CreateMenu.jsx, IdentityMenu.jsx) read getOpen() after setOpen() in toggle, so the focus-first-item branch never fired on open — Solid signals update synchronously. Now captures the pre-toggle value (const opening = !getOpen()) and guards the queueMicrotask first-item focus on it. Esc/outside-click/arrow/Tab popover contract untouched. Headless cover: web/test/unit/menu-focus-477.test.js (9 tests); targeted create-menu-466 + identity-nav + menu-focus-477: 53/53 green; full node --test: 885/900 with the same 15 failures as pristine origin/main (pre-existing, unrelated); vite build green. No backend change, no new deps. Browser proof open (shared-daemon loopback guard — not attempted per task).

Fixes #477. Both navbar menus (CreateMenu.jsx, IdentityMenu.jsx) read getOpen() after setOpen() in toggle, so the focus-first-item branch never fired on open — Solid signals update synchronously. Now captures the pre-toggle value (const opening = !getOpen()) and guards the queueMicrotask first-item focus on it. Esc/outside-click/arrow/Tab popover contract untouched. Headless cover: web/test/unit/menu-focus-477.test.js (9 tests); targeted create-menu-466 + identity-nav + menu-focus-477: 53/53 green; full node --test: 885/900 with the same 15 failures as pristine origin/main (pre-existing, unrelated); vite build green. No backend change, no new deps. Browser proof open (shared-daemon loopback guard — not attempted per task).
Both navbar menus read getOpen() after setOpen() in toggle, so the
focus-first-item branch never fired on open (Solid signals update
synchronously). Capture the pre-toggle value (const opening = !getOpen())
and guard the queueMicrotask first-item focus on it. Esc/outside-click/
arrow/Tab popover contract untouched.

Headless cover: web/test/unit/menu-focus-477.test.js.
Sign in to join this conversation.
No description provided.