Close the popup menus on an outside click, via the popover API #51
Reference in New Issue
Block a user
Delete Branch "menu-outside-click"
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?
The language picker, profile menu and row kebabs were
<details>, so they only closed by clicking the trigger again. They are now a<button popovertarget>plus a[popover]panel: the browser dismisses them on an outside click or Esc, opening one closes the others, and the panel sits in the top layer where a scrolling table can no longer clip it.Placement is CSS anchor positioning. The panel needs
position-anchor: auto— a bareanchor()resolves to nothing in Chromium, Firefox and WebKit alike, measured in all three before choosing.data-table.ejsstopped hand-rolling its kebab and calls themenupartial, so the pattern lives in one file.<details>stays in the nav tree, where it means disclosure rather than popup. A browser older than the popover API renders the panels inline, so Sign out is never stranded behind an inert button.