Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#9675 closed bug (fixed)

Draggable: Animation issue with revert and connectToSortable

Reported by: tapapax Owned by: mikesherov
Priority: minor Milestone: 1.11.2
Component: ui.draggable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

Hi!

I've got some issue with draggable, which is connected with multiple sortables. The issue appears in two ways:

1) If I'm dragging an item from draggable _throw_ some sortable, "revert" option of this sortable become false (at jquery-ui.js:1685).

2) If mouse cursor skipped from one sortable to another while dragging (without leaving sortables area), then item will move a bit weird after releasing mouse button. It will first return to it's original place (at it's draggable), and after that it will move to the sortable (this is right).

Versions 1.10.3 and 1.8.0. All major browsers.

I am very sorry for my bad english.

link: http://jsbin.com/odiqi3

video 1: http://list.dominosoft.ru/media/revert.wmv

video 2: http://list.dominosoft.ru/media/weirdMovement.wmv

Change History (11)

comment:1 Changed 10 years ago by tj.vantoll

Owner: set to tapapax
Status: newpending

Hi tapapax,

Thanks for taking the time to contribute to the jQuery UI project. Your first concern is covered by bug #9481. For your second issue I believe it has already been reported in #9099. Could you confirm that's the same issue you're seeing?

Thanks.

comment:2 Changed 10 years ago by tapapax

Status: pendingnew

Hi tj.vantoll,

Thank you.

Right, this http://bugs.jqueryui.com/ticket/9099#comment:8 comment seems similar, but I think it is not the same issue. Among others, it is not describing animation problem, which can be seen on my video http://list.dominosoft.ru/media/weirdMovement.wmv

comment:3 Changed 10 years ago by tj.vantoll

Status: newpending

Ok thanks.

Are you seeing the problem in the JS Bin test case you provided? I can't recreate it there. Also, can you update it to use the following files and see if the problem still occurs (it's the latest code from the master branch from the git repo).

<link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-git.js"></script>
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>

Thanks.

comment:4 in reply to:  3 Changed 10 years ago by tapapax

Status: pendingnew

Yes, there is a problem in it. I changed this test case a bit, now http://jsbin.com/odiqi3/176/ it is easier to reproduce the bug. Just drag draggable inside top sortable first, and than (you should do it fast) move it inside bottom one. Maybe you will need a few attempts to get this behaviour.

Demo: http://list.dominosoft.ru/media/demo.avi

New test case is using jquery-ui from git repo, but the problem is still the same.

Thanks!

comment:5 Changed 10 years ago by tj.vantoll

Component: ui.coreui.draggable
Status: newopen
Summary: Draggable with multiple sortablesDraggable: Animation issue with revert and connectToSortable

Thanks for sticking with this tapapax. I see the issue now.

comment:6 Changed 9 years ago by mikesherov

Owner: changed from tapapax to mikesherov
Status: openassigned

Well, this one is annoying but I'm working on this fix now.

comment:7 Changed 9 years ago by Mike Sherov

Resolution: fixed
Status: assignedclosed

Draggable: Ensure css is always restored after connectToSortable drag

Fixes #9675

Changeset: 27ed20715f4b3e256f5279825ac551bbfcdfbe81

comment:8 Changed 9 years ago by Mike Sherov

Draggable: Refresh sortables when draggable is added or removed

Since a sortable grows or shrinks when a draggable element is added to it, refresh the cached positions of sortables whenever an element is added or removed from the sortable.

Refs #9675

Changeset: a611dd8971a5fada1ca9e661ad1944b401192f0d

comment:9 Changed 9 years ago by Mike Sherov

Sortable: cancelHelperRemoval only considers helper, not placeholder

Refs #9675

Changeset: 52a1de5caadd9dd0665d4bf092f6061d9d3a3a8e

comment:10 Changed 9 years ago by Mike Sherov

Draggable: Add battery of tests to cover connectToSortable

Refs #9481 Refs #9675 Closes gh-1323

Changeset: bfb65076e4727d4d7fc88561b0304853accb925c

comment:11 Changed 9 years ago by mikesherov

Milestone: none1.11.2
Note: See TracTickets for help on using tickets.