Skip to content
Permalink
Browse files

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.
  • Loading branch information...
scottgonzalez committed Mar 16, 2010
1 parent 03adce3 commit 3c31d720ce6f745b9201a54aeee34de6c22c50ec
Showing with 5 additions and 2 deletions.
  1. +5 −2 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'];

0 comments on commit 3c31d72

Please sign in to comment.
You can’t perform that action at this time.