--- /dev/null
+<!doctype html>\r
+<html lang="en">\r
+<head>\r
+ <title>Sortable Visual Test : Sortable ticket #4551</title>\r
+ <link rel="stylesheet" href="../visual.css" type="text/css" />\r
+ <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">\r
+ <script type="text/javascript" src="../../../jquery-1.3.2.js"></script>\r
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>\r
+ <script type="text/javascript" src="../../../ui/ui.sortable.js"></script>\r
+ <script type="text/javascript">\r
+ $(function() {\r
+ $("#first, #second").sortable({\r
+ connectWith: '.sortable'\r
+ }).disableSelection();\r
+ });\r
+ </script>\r
+ <style type="text/css">\r
+ .sortable { margin: 0; padding: 0; }\r
+ .sortable div { margin: 3px 3px 3px 0; background: #ccc; padding: 1px; border: 1px solid black; float:left; width: 100px; height: 140px; font-size: 1em; text-align: center; }\r
+ #second div { background: #acc; }\r
+ </style>\r
+</head>\r
+<body>\r
+\r
+<h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/4551">#4551 - Sortable connectWith fails if item is floated</a></h1>\r
+\r
+<div id="first" class="sortable">\r
+ <div>1</div>\r
+ <div>2</div>\r
+ <div>3</div>\r
+ <div>4</div>\r
+ <div>5</div>\r
+ <div>6</div>\r
+ <div>7</div>\r
+ <div>8</div>\r
+ <div>9</div>\r
+ <div>10</div>\r
+ <div>11</div>\r
+ <div>12</div>\r
+</div>\r
+\r
+<br style="clear:both;">\r
+<hr />\r
+\r
+<div id="second" class="sortable">\r
+ <div>12</div>\r
+ <div>14</div>\r
+</div>\r
+\r
+</body>\r
+</html>\r
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) {