fix(ui): DIAGNOSTICS menu detach, focus loss on F-key, listener cleanup #182
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from review pass 2 on #173 (deferred P3s, all in
app/static/js/src/ui/deck_menu.js).Findings
getBoundingClientRect(). When the button is clipped by the deck selector'soverflow-x,menuPlacementclampsleftto 0 or the right viewport edge (around line 47). The menu stays open at the viewport edge, away from a button that is not visible. Also, the left clamp uses a margin of 0, while the right clamp usesVIEWPORT_MARGIN(8px).syncActive()callsclose()without restoring focus (around line 167). If F4/F6/F7 is pressed while a menu item has focus, the item becomesdisplay:noneand focus falls to<body>.destroy(). This is harmless today, sinceinitDiagnosticsMenucreates only one menu, but it matters ifDeckMenuis reused (e.g. for #170).Acceptance criteria
syncActive()while focus is inside the menu returns focus to the DIAGNOSTICS button.DeckMenuhas adestroy()that removes every listener it added.tests/frontend/test_deck_menu.test.js.