Skip to content

Commit

Permalink
fix(VSnackbar): handle pointerleave event after transition ends (#20312)
Browse files Browse the repository at this point in the history
fixes #20306
  • Loading branch information
huynhtehoa authored Aug 13, 2024
1 parent 2690e67 commit d25879a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vuetify/src/components/VSnackbar/VSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ export const VSnackbar = genericComponent<VSnackbarSlots>()({
}
}

function onAfterLeave () {
if (isHovering.value) onPointerleave()
}

const locationClasses = computed(() => {
return props.location.split(' ').reduce((acc, loc) => {
acc[`v-snackbar--${loc}`] = true
Expand Down Expand Up @@ -226,6 +230,7 @@ export const VSnackbar = genericComponent<VSnackbarSlots>()({
_disableGlobalStack
onTouchstartPassive={ onTouchstart }
onTouchend={ onTouchend }
onAfterLeave={ onAfterLeave }
{ ...scopeId }
v-slots={{ activator: slots.activator }}
>
Expand Down

0 comments on commit d25879a

Please sign in to comment.