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
Everything works right if page is not scrolled, but if you:
scroll the page to bottom (or by any meaningful amount)
to drag any element
then container is automatically scrolled to top.
A video example is on youtube. You can see that when page is not scrolled - autoscroll works fine, it is scrolled then no matter which way I drag it will scroll to the top.
This happens because in autoScrollMove mousePointer uses clientX/Y values which are relative to visible viewport of the browser but getElementRect takes in account page scroll (which shouldn't be used for fixed elements).
If I try to ignore scroll values from getElementRect then autoScroll and restriction do not work or work badly.
The text was updated successfully, but these errors were encountered:
Here is the example http://jsfiddle.net/bumbu/qjudjkxa/
Everything works right if page is not scrolled, but if you:
then container is automatically scrolled to top.
A video example is on youtube. You can see that when page is not scrolled - autoscroll works fine, it is scrolled then no matter which way I drag it will scroll to the top.
This happens because in
autoScrollMove
mousePointer uses clientX/Y values which are relative to visible viewport of the browser butgetElementRect
takes in account page scroll (which shouldn't be used for fixed elements).If I try to ignore scroll values from
getElementRect
then autoScroll and restriction do not work or work badly.The text was updated successfully, but these errors were encountered: