fix(nav): prevent style dropdown from closing hamburger menu
Stop click event propagation from the nested AbacusDisplayDropdown to prevent it from closing the parent hamburger menu. Added stopPropagation to: - Style dropdown trigger button - Style dropdown content wrapper This allows the nested dropdown to function independently without affecting the parent menu state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ export function AbacusDisplayDropdown({ isFullscreen = false }: AbacusDisplayDro
|
||||
<DropdownMenu.Root open={open} onOpenChange={handleOpenChange}>
|
||||
<DropdownMenu.Trigger asChild>
|
||||
<button
|
||||
onClick={(e) => e.stopPropagation()} // Prevent parent dropdown from closing
|
||||
className={css({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -75,6 +76,7 @@ export function AbacusDisplayDropdown({ isFullscreen = false }: AbacusDisplayDro
|
||||
|
||||
<DropdownMenu.Portal>
|
||||
<DropdownMenu.Content
|
||||
onClick={(e) => e.stopPropagation()} // Prevent clicks inside from closing parent
|
||||
className={css({
|
||||
bg: isFullscreen ? 'rgba(0, 0, 0, 0.85)' : 'white',
|
||||
rounded: 'xl',
|
||||
|
||||
Reference in New Issue
Block a user