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(() => {
|
||||
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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue