mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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:
parent
03adce34dd
commit
3c31d720ce
5
ui/jquery.ui.sortable.js
vendored
5
ui/jquery.ui.sortable.js
vendored
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user