react-cursor-position
react-cursor-position copied to clipboard
isPositionOutside:true due to negative x or y values, when mouse is in container
When react-cursor-position is wrapped in react-slick and in modal container like react-responsive-modal it happens that the position of x or y can get negative even when the mouse is in the container.
To reproduce I created this Codesandbox POC https://codesandbox.io/s/wwwvzv1818
Steps to reproduce:
- Visit https://codesandbox.io/s/wwwvzv1818 e.g in Chrome 71
- Open the overly
- slide the carousel to the left e.g 3 time
- move the mouse
Current Result: x or y values go to negative, and isPositionOutside is set to true even when the mouse is in the container.
+1 I have same problem. Help plz
How specifically to slide it to the left 3 times, it's already open on the left and does not cycle.
Possible solution: call method reset()
on ReactCursorPosition each time you slide the carousel. I have similar problem with ReactCursorPosition inside scrollable container - it helps me.