diff --git a/tests/visual/sortable/sortable_ticket_4551.html b/tests/visual/sortable/sortable_ticket_4551.html deleted file mode 100644 index 2b83ae42e..000000000 --- a/tests/visual/sortable/sortable_ticket_4551.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Sortable Visual Test : Sortable ticket #4551 - - - - - - - - - - - - -

#4551 - Sortable connectWith fails if item is floated

- -
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
- -
-
- -
-
12
-
14
-
- - - diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 8356eeb9f..131fb50d0 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -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) {