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 2d3bc1312e
commit 63c3310a8f
1 changed files with 2 additions and 2 deletions

View File

@ -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>