Open lhoucinecherif opened 4 weeks ago
Hey there 👋
I noticed this strange behavior too while using useMouseInElement with type page. It is also visible in the demo here.
If I scroll without moving the mouse, not only isOutside
but also y
and elementY
get off. I guess it would be the same for x values in case the page was with a horizontal scroll.
https://github.com/user-attachments/assets/ac78ea27-8d14-486a-b19e-588a9c3cc07b
I could see that this composable uses useMouse
under the hood and the demo has the same behavior so the culprit is this composable.
https://github.com/user-attachments/assets/f12ebf1c-a336-40f3-961f-7f652bcc6189
Describe the bug
I'm experiencing an issue with the useMouseInElement function from VueUse in a Nuxt3 project. The isOutside value always returns true when I scroll the page whithout moving the mouse, even if the mouse is inside the element.
Reproduction
https://stackblitz.com/edit/vitejs-vite-iwn1w4?file=src%2FApp.vue
System Info
Used Package Manager
pnpm
Validations