Sortable: Fixed a bug with over/out events and connected draggables.

Fixes #5346 - over and out events not triggered when draggable connected with single (non-nested) sortable.
This commit is contained in:
Scott González 2010-03-16 01:15:57 +00:00
parent 03adce34dd
commit 3c31d720ce

View File

@ -701,7 +701,10 @@ $.widget("ui.sortable", $.ui.mouse, {
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'];