Skip to main content

Search and Top Navigation

Ticket #5346: sortable-over-out.diff
File sortable-over-out.diff, 0.8 KB (added by kswedberg, March 15, 2010 08:03PM UTC)

patch

--- jquery.ui.sortable.js
+++ (karl)
@@ -701,7 +701,10 @@
        if(!innermostContainer) return; 

        // move the item into the container if it's not there already 
-        if(this.currentContainer != this.containers[innermostIndex]) { 
+        if(this.containers.length === 1) {
+          this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); 
+            this.containers[innermostIndex].containerCache.over = 1;
+        } else if(this.currentContainer != this.containers[innermostIndex]) { 

            //When entering a new container, we will find the item with the least distance and append our item near it 
            var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];

Download in other formats:

Original Format