@@ -571,13 +571,29 @@ $.ui.plugin.add("draggable", "connectToSortable", {
571
571
572
572
$ . each ( inst . sortables , function ( i ) {
573
573
574
+ var innermostIntersecting = false ;
575
+ var thisSortable = this ;
574
576
//Copy over some variables to allow calling the sortable's native _intersectsWith
575
577
this . instance . positionAbs = inst . positionAbs ;
576
578
this . instance . helperProportions = inst . helperProportions ;
577
579
this . instance . offset . click = inst . offset . click ;
578
580
579
581
if ( this . instance . _intersectsWith ( this . instance . containerCache ) ) {
582
+ innermostIntersecting = true ;
583
+ $ . each ( inst . sortables , function ( ) {
584
+ this . instance . positionAbs = inst . positionAbs ;
585
+ this . instance . helperProportions = inst . helperProportions ;
586
+ this . instance . offset . click = inst . offset . click ;
587
+ if ( this != thisSortable
588
+ && this . instance . _intersectsWith ( this . instance . containerCache )
589
+ && $ . ui . contains ( thisSortable . instance . element [ 0 ] , this . instance . element [ 0 ] ) )
590
+ innermostIntersecting = false ;
591
+ return innermostIntersecting ;
592
+ } ) ;
593
+ }
594
+
580
595
596
+ if ( innermostIntersecting ) {
581
597
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
582
598
if ( ! this . instance . isOver ) {
583
599
0 commit comments