Move HoverIndicator mouseleave handler to body element for better detection rates
This commit is contained in:
parent
2d3bc1312e
commit
63c3310a8f
|
@ -20,12 +20,12 @@
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
document.addEventListener("mouseover", onMouseOver)
|
document.addEventListener("mouseover", onMouseOver)
|
||||||
window.addEventListener("mouseleave", onMouseLeave)
|
document.body.addEventListener("mouseleave", onMouseLeave)
|
||||||
})
|
})
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
document.removeEventListener("mouseover", onMouseOver)
|
document.removeEventListener("mouseover", onMouseOver)
|
||||||
window.removeEventListener("mouseleave", onMouseLeave)
|
document.body.removeEventListener("mouseleave", onMouseLeave)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue