Replies: 2 comments 1 reply
-
I also have the same issue and whats more annoying is that I cannot even debug the NavigationMenu.Content popover since the trigger is hovering and whenever I move the cursor to the devtools the menu disappears immediately. @huntabyte Can you optionally make the trigger by clicking instead of hovering?
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Just learn't that the issue happens when you leave out viewport={false} from NavigationMenu.Root. You can run this fresh install to test https://github.com/TimTruston/sveltekit-template. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When hovering over a NavigationMenu.Trigger, the corresponding NavigationMenu.Content popover appears all the way to the left of the container instead of directly under the trigger, making its links unreachable.
Expected Behavior:
The popover should open directly beneath “Item One”, either left-aligned (left-0 top-full mt-2) or centered under the trigger (left-1/2 -translate-x-1/2 top-full mt-2), as shown in the official documentation.
Actual Behavior:
The popover appears at the left edge of its parent container (or viewport), not under the trigger, preventing any interaction with its contents.
Reproduction
Create a SvelteKit 5 project with shadcn-svelte’s NavigationMenu.
Implement a simple navbar:
<NavigationMenu.Root>
<NavigationMenu.List>
<NavigationMenu.Item>
<NavigationMenu.Trigger>Item One</NavigationMenu.Trigger>
<NavigationMenu.Content>
<NavigationMenu.Link>Link</NavigationMenu.Link>
</NavigationMenu.Content>
</NavigationMenu.Item>
</NavigationMenu.List>
</NavigationMenu.Root>
and repeat it x times.
Logs
System Info
Severity
annoyance
Beta Was this translation helpful? Give feedback.
All reactions