diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-03-16 01:15:57 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-03-16 01:15:57 +0000 |
commit | 3c31d720ce6f745b9201a54aeee34de6c22c50ec (patch) | |
tree | 289082c547af5e1c7ce9759ac4dc1e48aec86a94 /ui | |
parent | 03adce34dd0d53af47e64091cb41bf1e438e836e (diff) | |
download | jquery-ui-3c31d720ce6f745b9201a54aeee34de6c22c50ec.tar.gz jquery-ui-3c31d720ce6f745b9201a54aeee34de6c22c50ec.zip |
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.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.sortable.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index d29e708e8..28be062f6 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -700,8 +700,11 @@ $.widget("ui.sortable", $.ui.mouse, { // if no intersecting containers found, return if(!innermostContainer) return; - // move the item into the container if it's not there already - if(this.currentContainer != this.containers[innermostIndex]) { + // move the item into the container if it's not there already + 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']; |