Skip to content

Commit

Permalink
fix(NavigationMenu): whenMouse not triggering (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Mar 19, 2024
1 parent 68c9d29 commit 5a3acd7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const isLastActiveValue = computed(() => {
}"
v-bind="{ ...$attrs, ...props, ...emitsAsProps }"
@pointerenter="menuContext.onContentEnter(itemContext.value)"
@pointerleave="whenMouse(() => menuContext.onContentLeave())"
@pointerleave="whenMouse(() => menuContext.onContentLeave())($event)"
@pointer-down-outside="emits('pointerDownOutside', $event)"
@focus-outside="emits('focusOutside', $event)"
@interact-outside="emits('interactOutside', $event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ useResizeObserver(content, () => {
['--radix-navigation-menu-viewport-height' as any]: size ? `${size?.height}px` : undefined,
}"
@pointerenter="menuContext.onContentEnter(menuContext.modelValue.value)"
@pointerleave="whenMouse(() => menuContext.onContentLeave())"
@pointerleave="whenMouse(() => menuContext.onContentLeave())($event)"
>
<slot />
</Primitive>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ const currentTrigger = ref('')
</NavigationMenuTrigger>
<NavigationMenuContent
class="data-[motion=from-start]:animate-enterFromLeft data-[motion=from-end]:animate-enterFromRight data-[motion=to-start]:animate-exitToLeft data-[motion=to-end]:animate-exitToRight absolute top-0 left-0 w-full sm:w-auto"
@escape-key-down.prevent
@pointer-down-outside.prevent
@focus-outside.prevent
>
<ul
class="one m-0 grid list-none gap-x-[10px] p-[22px] sm:w-[500px] sm:grid-cols-[0.75fr_1fr]"
Expand Down

0 comments on commit 5a3acd7

Please sign in to comment.