2

I use jQuery draggable on a list which is is too long. When I drag an element from viewport it's ok. But if I drag an element towards the end of the document and scroll up it looses it's position.

Here is the link http://jsbin.com/imawuk/3

I tried all options in documentation but couldn't fix this

Am I doing something wrong or this may be a bug to report?

Ergec
  • 11,608
  • 7
  • 52
  • 62
  • I am not 100% sure on how to fix, but I believe it happens due to the window scrolling. As it goes outside the window frame and the window starts to auto scroll, the position is off by the offset of how much it has scrolled. You could try subtracting this offset from the position in a callback when the draggable component goes outside the bounds of the window. Look into `$(window).height();` for the height of the window, and `$(window).scrollTop();` for the scroll offset – jyore Jul 15 '11 at 15:40
  • this might be related: http://stackoverflow.com/questions/5791886/jquery-draggable-shows-helper-in-wrong-place-when-scrolled-down-page – vsync Nov 07 '12 at 07:00

0 Answers0