mirror of
https://github.com/docmost/docmost.git
synced 2026-07-07 05:14:32 +10:00
38f7ffefe0
The Rename / Delete-view popover (right-click on a view tab) wasn't closing on outside click or Escape. The container was a <Popover> with hand-rolled <UnstyledButton> menu items — closeOnClickOutside and closeOnEscape on Mantine Popover only fire onClose when focus is inside the dropdown, which never happens here because the popover opens via a context-menu (focus stays on body) and there's no trapFocus. Switch to Mantine <Menu>, which is purpose-built for this pattern: closeOnClickOutside / closeOnEscape work without focus being inside, closeOnItemClick removes the manual setMenuOpened(false) wiring on each item, and the keyboard arrow-key navigation is free.