Move HoverIndicator mouseleave handler to body element for better detection rates
This commit is contained in:
parent
ba4a616982
commit
3b4fbc2ed8
|
@ -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