You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While useMouse is totally correct to not update x or y value on scroll, this is not what should happen for the value of elementX, elementY and isOutside on useMouseInElement when the element is not sticky.
If I scroll on a page the position of the mouse is not changing which is correct, but scrolling move elements in the page thus changing the position of the mouse in this element.
Since useMouseInElement is not updating elementX, elementY and isOutside, on scroll they end up been false.
place your cursor in the element then scoll, the elementX, elementY are not updating and if you scroll until the cursor is out of the element isOutside is still at false.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
While useMouse is totally correct to not update x or y value on scroll, this is not what should happen for the value of elementX, elementY and isOutside on useMouseInElement when the element is not sticky.
If I scroll on a page the position of the mouse is not changing which is correct, but scrolling move elements in the page thus changing the position of the mouse in this element.
Since useMouseInElement is not updating elementX, elementY and isOutside, on scroll they end up been false.
To reproduce the problem you can use the doc :
place your cursor in the element then scoll, the elementX, elementY are not updating and if you scroll until the cursor is out of the element isOutside is still at false.
Reproduction
https://vueuse.org/core/useMouseInElement/
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: