Skip to content

Commit

Permalink
fix(Tooltip): use trigger's ownerDocument to track pointermove (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iammola authored Oct 5, 2024
1 parent 1fe64b7 commit d6d0c71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/radix-vue/src/shared/useGraceArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export function useGraceArea(triggerElement: Ref<HTMLElement | undefined>, conta
pointerExit.trigger()
}
}
document.addEventListener('pointermove', handleTrackPointerGrace)
triggerElement.value?.ownerDocument.addEventListener('pointermove', handleTrackPointerGrace)

cleanupFn(() => document.removeEventListener('pointermove', handleTrackPointerGrace))
cleanupFn(() => triggerElement.value?.ownerDocument.removeEventListener('pointermove', handleTrackPointerGrace))
}
})

Expand Down

0 comments on commit d6d0c71

Please sign in to comment.