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