fix: drawer stays open when moving mouse from rail to drawer

Remove onMouseLeave from individual rail items — only the outer
wrapper handles close. Items only handle onMouseEnter to switch
which drawer is shown. Prevents premature drawer dismissal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-03-22 01:40:57 -04:00
parent 6fb0d9bf81
commit 585149fa94

View File

@@ -246,13 +246,11 @@ export function Sidebar() {
key={key}
className="relative w-full"
onMouseEnter={() => hasChildren && !sidebarPinned ? openFlyout(key) : undefined}
onMouseLeave={() => hasChildren && !sidebarPinned ? closeFlyout() : undefined}
>
<Link
to={item.href}
onMouseEnter={() => prefetchForRoute(item.href)}
onFocus={() => hasChildren && !sidebarPinned ? openFlyout(key) : undefined}
onBlur={() => hasChildren && !sidebarPinned ? closeFlyout() : undefined}
className={cn(
'group relative flex flex-col items-center justify-center rounded-lg px-1 py-2 transition-all duration-150',
active