Move HoverIndicator mouseleave handler to body element for better detection rates

This commit is contained in:
Andrew Kingston 2021-06-11 13:17:38 +01:00
parent ba4a616982
commit 3b4fbc2ed8
1 changed files with 2 additions and 2 deletions

View File

@ -20,12 +20,12 @@
onMount(() => {
document.addEventListener("mouseover", onMouseOver)
window.addEventListener("mouseleave", onMouseLeave)
document.body.addEventListener("mouseleave", onMouseLeave)
})
onDestroy(() => {
document.removeEventListener("mouseover", onMouseOver)
window.removeEventListener("mouseleave", onMouseLeave)
document.body.removeEventListener("mouseleave", onMouseLeave)
})
</script>