react-cursor-position icon indicating copy to clipboard operation
react-cursor-position copied to clipboard

isPositionOutside:true due to negative x or y values, when mouse is in container

Open weiner opened this issue 5 years ago • 3 comments

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:

  1. Visit https://codesandbox.io/s/wwwvzv1818 e.g in Chrome 71
  2. Open the overly
  3. slide the carousel to the left e.g 3 time
  4. 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.

weiner avatar Jan 29 '19 15:01 weiner

+1 I have same problem. Help plz

Emidomenge avatar Jan 29 '19 15:01 Emidomenge

How specifically to slide it to the left 3 times, it's already open on the left and does not cycle.

todmar13 avatar Mar 02 '19 15:03 todmar13

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.

k-andrey avatar Jun 28 '19 09:06 k-andrey