#6817 closed bug (fixed)
Draggable: auto scroll goes double distance when dragging
Reported by: | chrisdew | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.3 |
Component: | ui.draggable | Version: | 1.8.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Originally posted on http://stackoverflow.com/questions/4606655/jqueryui-auto-scroll-goes-double-distance-when-dragging
I've distilled the problem into the shortest page which exhibits the problem (apologies for inline style).
If you scroll down and drag the 'drag me' title, look how the dragged element zooms away from the cursor. It seems to be moving double the distance (relative to the document) that it needs to.
I have reproduced the problem in IE8, FF3.5 and Chrome. On WinXP and Ubuntu.
From feedback on stackoverflow it looks like I've encountered a bug.
Thanks,
Chris.
<!DOCTYPE html> <html> <head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script> <script type="text/javascript">
$(document).ready(function() {
$(".draggable").draggable();
});
</script>
</head> <body> <div style="width: 100px; height: 1000px; background: green;"> </div> <h1 class="draggable">drag me</h1> <div style="width: 100px; height: 1000px; background: green;"> </div> </body> </html>
Change History (19)
comment:1 Changed 12 years ago by
comment:3 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:4 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Thanks for taking the time to contribute to the jQuery UI project! I can no longer reproduce the issue using the latest jQuery and jQuery UI. http://jsfiddle.net/PkfP7/
If you can still reproduce it, please feel free to reply to this ticket with a test case showing the problem. Thanks!
comment:5 Changed 10 years ago by
I can still reproduce it, on the fiddle you provided and even on the jqueryui.com demos: http://jqueryui.com/draggable/#scroll
Just scroll any element of the three, they all scrolls too much.
Chrome 23, chrome canary, firefox 16.0.2
comment:6 Changed 10 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:7 Changed 10 years ago by
Status: | reopened → open |
---|
comment:8 Changed 10 years ago by
with helper:clone the element scrolls fine: http://jsfiddle.net/maxgalbu/PkfP7/1/
comment:9 Changed 10 years ago by
Summary: | draggable - auto scroll goes double distance when dragging → Draggable: auto scroll goes double distance when dragging |
---|
comment:10 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Draggable: Fix double offset bug when scrolling. Fixes #6817 - Draggable: auto scroll goes double distance when dragging
Changeset: 82f588e82b887fdcb2406da2c5dfedc2f13ebdc9
comment:11 Changed 10 years ago by
Milestone: | 2.0.0 → 1.11.0 |
---|
comment:14 Changed 10 years ago by
Draggable: Fix double offset bug when scrolling. Fixes #6817 - Draggable: auto scroll goes double distance when dragging (cherry picked from commit 82f588e82b887fdcb2406da2c5dfedc2f13ebdc9)
Changeset: 943537cb785fb90adf9f0b515cbb084a1a2e3c04
comment:15 Changed 10 years ago by
Milestone: | 1.11.0 → 1.10.3 |
---|
comment:16 Changed 9 years ago by
Thanks for fixing this. I can confirm that it works properly in 1.10.3.
comment:17 follow-up: 18 Changed 9 years ago by
I am astonished that this issue, reported over 5 years ago in ticket 3740 is still occurring in v.1.10.3. And, the script modification that fixed it in 3740 is still fixing it when added to v.1.10.3.
In my case, I have some tables designed to look like list boxes, which scroll through a list of text entries. These text entries are dragged from one box to another. It all functions correctly in Chrome, but breaks as previously described when the list is scrolled in FireFox. To reiterate, this involves a scrolling document containing tables which scroll text.
A small amount of scrolling in the list boxes results in a 300px to 400px offset between the cursor and the helper clone. If anyone is interested, I can grant access to this Web page, so you can experiment with it.
comment:18 Changed 9 years ago by
Replying to fchateau:
I am astonished that this issue, reported over 5 years ago in ticket 3740 is still occurring in v.1.10.3. And, the script modification that fixed it in 3740 is still fixing it when added to v.1.10.3.
In my case, I have some tables designed to look like list boxes, which scroll through a list of text entries. These text entries are dragged from one box to another. It all functions correctly in Chrome, but breaks as previously described when the list is scrolled in FireFox. To reiterate, this involves a scrolling document containing tables which scroll text.
A small amount of scrolling in the list boxes results in a 300px to 400px offset between the cursor and the helper clone. If anyone is interested, I can grant access to this Web page, so you can experiment with it.
This should be fixed in master. See #9315 and try using http://code.jquery.com/ui/jquery-ui-git.js to see if it resolves your issue.
comment:19 Changed 9 years ago by
I can't believe after 5 years, you guys have finally got this thing right. ;)
Seriously, I think my page design was a extreme test of this draggable functionality. Congratulations on a job well done.
http://jsbin.com/uvodi3 - in jsbin