Skip to main content

Bug Tracker

Side navigation

#2780 closed bug (invalid)

Opened May 02, 2008 06:37PM UTC

Closed December 05, 2009 04:20AM UTC

Last modified March 14, 2012 07:04PM UTC

Sortables - Revert

Reported by: wjchristenson2 Owned by: paul
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Sortable Cc:
Blocked by: Blocking:
Description

If revert is enabled and you drag a sortble item into the slot a sortable item is reverting into, they overlap and it breaks the sortable.

This happens both in FireFox and IE. I disabled revert as a work around. To reproduce, enable revert and drag/drop items very fast into the same location.

Attachments (0)
Change History (5)

Changed May 03, 2008 07:38AM UTC by paul comment:1

resolution: → worksforme
status: newclosed

I wasn't able to reproduce the issue - can you check if you can reproduce it on http://dev.jquery.com/view/trunk/ui/demos/i.sortable.html? Most of the lists have revert enabled, and I tried dragging really fast. If it still happens for you, please reopen the issue,. Thanks!

Changed June 19, 2008 07:12AM UTC by dmuir comment:2

resolution: worksforme
status: closedreopened

I can confirm the behaviour in the original post.

Link provided is dead. I'm assuming you meant to link to:

http://dev.jquery.com/view/tags/ui/latest/demos/functional/#ui.sortable

The problem occurs when you sort before the revert has had a chance to complete.

Not a problem with the connected lists (revert is off)

But in the second sortable demo using placeholders, you can get it to stuff up if you click and drag one of the items away, then before it has a chance to return back to its original position, you click and sort another list item.

The helper doesn't get destroyed, and the original remains with visibility: hidden

Changed November 26, 2008 09:03PM UTC by volomike comment:3

I can confirm the behavior using FF2 (Windows only) and IE (any version) using jQuery UI 1.6rc2. Once I used FF3 on Ubuntu 8.04, the problem didn't occur, and I suspect because the containment option doesn't work on Linux -- the items move to the left like 100 pixels and it's impossible to click in the way dmuir mentions. It's also a hard problem to reproduce unless you do exactly the kind of clicking that dmuir mentions.

Take the revert property out, and the problem is resolved.

Changed December 12, 2008 12:22PM UTC by fabien comment:4

Hi

I can easily reproduce the issue when I move items very fast as mentioned by dmuir. When debugging with Firebug, I can see that items are still here, but hidden. If I remove the "visibility:hidden" property on-the-fly, the item reappears. Sometimes, no item has the "visibility:hidden" property, but the helper is visible, so I just add "visibility:hidden" to the helper and everything goes right again.

Here is a copy-paste of what I have in firebug window:

<ul id="placeholderSortable" class="ui-sortable" style="position: relative;">

<li id="user_1" class="element">

</li>

<li id="user_3" class="element" style="visibility: hidden;">

</li>

<li id="user_4" class="element">

</li>

<li id="user_5" class="element">

</li>

<li id="user_6" class="element" style="visibility: hidden;">

</li>

<li id="user_6" class="element ui-sortable-helper" style="position: absolute; clear: both; z-index: 1000; left: 440px; top: 200px; visibility: hidden;">

</li>

<li id="user_2" class="element" style="visibility: hidden;">

</li>

<li id="user_6" class="element ui-sortable-helper" style="position: absolute; clear: both; z-index: 1000; left: 440px; top: 200px;">

</li>

<li id="user_2" class="element ui-sortable-helper" style="position: absolute; clear: both; z-index: 1000; left: 640px; top: 200px;">

</li>

<li id="user_7" class="element" style="">

</li>

<li id="user_8" class="element" style="">

</li>

<li id="user_3" class="element ui-sortable-helper" style="position: absolute; clear: both; z-index: 1000; left: 440px; top: 0px;">

You can see that element 2, 3 and 6 are hidden and there are 4 sortable-helpers that are visible but shouldn't.

Hope this will help you to debug.

Of course, when I remove revert:true, everything works fine.

Config : FF 3.0.4, Windows, UI 1.5.3

$("#placeholderSortable").sortable({

placeholder: "ui-selected",

revert: true,

tolerance:'pointer'

});

Changed December 05, 2009 04:20AM UTC by john comment:5

resolution: → invalid
status: reopenedclosed