react-times icon indicating copy to clipboard operation
react-times copied to clipboard

drag problem when page is scrolled

Open YannickBochatay opened this issue 7 years ago • 1 comments

Hi, there's a problem of drag'n drop when page is scrolled. I looked at the file drag.js, and don't understand why you add scroll in the object returned (scroll is already added in the pageY property). When I comment like this, it works fine :

return { x: xPos /* + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft)*/, y: yPos /* + Math.max(document.documentElement.scrollTop, document.body.scrollTop)*/ };

YannickBochatay avatar Nov 20 '17 15:11 YannickBochatay

i also encountered this strange behavior on mobile phones where the screen is smaller the scrollbar appears and it breaks the drag.

Any news on this?

Gamesh avatar Apr 18 '19 11:04 Gamesh