fix(ui): prevent inline toolbar from hiding when interacting with submenus

- keep toolbar visible when focus moves to an element inside `[data-inline-toolbar]`
- unpin toolbar on cleanup when submenu closes to avoid stale pinned state
This commit is contained in:
2026-04-26 15:45:18 -04:00
parent be5bdf15b7
commit ff10c2ffea
2 changed files with 5 additions and 0 deletions
@@ -47,6 +47,7 @@ export default function InlineToolbar({ rect, activeMarks, onToggleMark, onSetMa
useEffect(() => {
onPinChange?.(openSubmenu !== null);
return () => { onPinChange?.(false); };
}, [openSubmenu, onPinChange]);
useLayoutEffect(() => {