Skip to main content

Search and Top Navigation

#3568 closed bug (fixed)

Opened November 13, 2008 11:54AM UTC

Closed November 19, 2008 02:21PM UTC

Last modified September 23, 2009 09:31PM UTC

Drag is jumping with scrollbar

Reported by: zeguizmo Owned by: paul
Priority: critical Milestone: 1.7
Component: ui.draggable Version: 1.6rc2
Keywords: drag scrollbar jump Cc:
Blocked by: Blocking:

Using IE, FF, Chrome, Opera... if there is a vertical scroll bar and I am not at the top of the page, the draggable function does not work properly and it jumps upward the same amount of height as the scroll height.

Here is a video showing the bug in action :

In the first part I use the .draggable() function with the scrollbar at the top of the page, it works perfectly, and in the second part I show you the bug.

I use the latest version of jQuery and the latest ui.draggable package. (not the dialog, just draggable)

I hope to hear from you soon because I can't fix it alone,

Thanks a lot,


Attachments (1)
  • 3568.htm (0.7 KB) - added by simon November 18, 2008 03:41PM UTC.

    Fairly minimal file to reproduce.

Change History (13)

Changed November 16, 2008 05:17AM UTC by scottgonzalez comment:1

milestone: TBD1.6
priority: minorcritical

Changed November 17, 2008 12:15PM UTC by simon comment:2

I can verify this on IE7. Also reported (incorrectly on the jQuery trac) 2 months ago Is a bit of a showstopper for me at the moment... is there a quick fix?

Changed November 17, 2008 12:29PM UTC by simon comment:3

There is a quick fix if you modify _generatePosition to include

+ ($.browser.msie ? document.documentElement.scrollTop : 0)

for the Y,

+ ($.browser.msie ? document.documentElement.scrollLeft : 0)

for the X into the equations.

Changed November 17, 2008 09:36PM UTC by zeguizmo comment:4

The bug occurs in every browser I have on my system : IE6, IE7, FF2, FF3, Opera, Chrome, Safari, Minefield ...

But I cant reproduce it easily, I think its because of the css complexity and the different relative / absolute position. It's probably a very particular case.

I'll try to reproduce it and find a fix asap, but I'm busy ...


Changed November 18, 2008 03:08PM UTC by simon comment:5

I'll try and get a minimal page for reproducing it when I get some time and will attach it here. :)

Changed November 18, 2008 03:44PM UTC by simon comment:6

As I stated, taking into account the scrollTop and scrollLeft values in __generatePosition seems to fix the issue, but I don't know the codebase well enough to be able to consider side effects of doing this etc.

Changed November 19, 2008 02:21PM UTC by paul comment:7

resolution: → fixed
status: newclosed

Hi there,

please try the latest trunk version in SVN (or the 1.6rc3 release, following soon), it adresses the issue, and I verified it works correctly using your test file in the reported browsers.

Changed November 22, 2008 09:35PM UTC by zeguizmo comment:8


I just tried the new version from the repository, same jumpy behaviour ... It is not the same bug than simon.

My bug occurs on every browsers, not just IE.

I will try to reproduce it in a single page.

I have not the permission to reopen the bug, so please re-open it, because it's not working ! (and the original post was not about the fixed bug).

Changed November 22, 2008 11:48PM UTC by zeguizmo comment:9


I have something solid here. When I put something draggable into something resizable, the bug occurs. In every browser.

BUT it is fixed in one version of jQuery.ui (not the future RC3 !)

Explanations :

I tried first with the automatic RC2 build (from the and as you can see here : the bug occurs.

But to make things clean, I wanted to use the links provided in the example of jQuery.ui documentation, so I made a page with the links like etc ...

And this time, there was no bug !

So I tried to look at the repository, and I found two differents repositories. One at With links like :

With this version, no problem, it works :

BUT I found another repository for jQuery.ui, the one linked to this bugtracker : and it seems up to date

I tried sources from this (copy and paste directly from the browser, i'm a bit lazy), and the bug occurs ! As shown here :

I think the version from the repository linked to this bugtracker is the future release candidate 3, and with this version the bug occurs, so I think there is some work before the RC3. Please reopen the ticket

I hope it helps !

If you have any question feel free to ask me, my English is very poor and it's hard for me to explain things :)



Changed November 24, 2008 02:42PM UTC by simon comment:10

Just to say apologies to you Guizmo, I misread your bug report and assumed it was the same issue that I was experiencing; I did not mean to invade your bug :)

Changed November 27, 2008 09:30AM UTC by dave1010 comment:11

Simon's fix seems to work for me, but the position is then calculated wrongly if the draggable is also droppable. I've tried adding the fix to _generatePosition in droppable too, but it doesn't seem to work.

The problem seems to be just in IE 7 (and IE 6). All other browsers (including IE 8) are fine.

The bug still occurs for me using

Please reopen the ticket

Changed November 27, 2008 09:39AM UTC by dave1010 comment:12

This bug was also reported on the jQuery Trac. This ticket contains some more information:

Changed December 11, 2008 05:01PM UTC by bmherold comment:13

Just making sure the ticket receives attention. I can report the same problem as dave1010. In IE7, with an item both draggable and droppable, the calculation is off by what looks like the amount scrolled down the page.