Skip to content
Permalink
Browse files

Sortable: Reverted 56b0da5 as #4551 is invalid.

  • Loading branch information
rdworth committed Apr 7, 2011
1 parent bc6a28e commit 54016b8469345a325e8c1ab6f8a7d17b0f0f8d01
Showing with 4 additions and 54 deletions.
  1. +0 −54 tests/visual/sortable/sortable_ticket_4551.html
  2. +4 −0 ui/jquery.ui.sortable.js

This file was deleted.

@@ -614,6 +614,10 @@ $.widget("ui.sortable", $.ui.mouse, {
for (var i = this.items.length - 1; i >= 0; i--){
var item = this.items[i];

//We ignore calculating positions of all connected containers when we're not over them
if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
continue;

var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;

if (!fast) {

1 comment on commit 54016b8

@courthead

This comment has been minimized.

Copy link
Contributor

@courthead courthead commented on 54016b8 Apr 22, 2012

Hmm, why skip calculating the positions of other containers? I believe skipping this causes problems down the road when you try to drag an item into another container. None of the position information is set on that container. However, you need this info when trying to figure out where to drag the item into the container (see the loop on line 732).

In conjunction with this, there's some other quirkyness going on too that I'm investigating. But the combined effect is that when you try to drag an item from one sortable to the top of a connected sortable, it inserts it into a random position, not the top position. (Try it here: http://jqueryui.com/demos/sortable/#connect-lists)

Please sign in to comment.
You can’t perform that action at this time.