@@ -17,7 +17,7 @@ const drop = function({
1717
1818 if ( toSortable && ! toSortable . el . contains ( target ) ) {
1919 dispatchSortableEvent ( 'spill' ) ;
20- this . onSpill ( dragEl ) ;
20+ this . onSpill ( { dragEl, putSortable } ) ;
2121 }
2222} ;
2323
@@ -28,8 +28,11 @@ Revert.prototype = {
2828 dragStart ( { oldDraggableIndex } ) {
2929 this . startIndex = oldDraggableIndex ;
3030 } ,
31- onSpill ( dragEl ) {
31+ onSpill ( { dragEl, putSortable } ) {
3232 this . sortable . captureAnimationState ( ) ;
33+ if ( putSortable ) {
34+ putSortable . captureAnimationState ( ) ;
35+ }
3336 let nextSibling = getChild ( this . sortable . el , this . startIndex , this . sortable . options ) ;
3437
3538 if ( nextSibling ) {
@@ -38,6 +41,9 @@ Revert.prototype = {
3841 this . sortable . el . appendChild ( dragEl ) ;
3942 }
4043 this . sortable . animateAll ( ) ;
44+ if ( putSortable ) {
45+ putSortable . animateAll ( ) ;
46+ }
4147 } ,
4248 drop
4349} ;
@@ -50,10 +56,11 @@ Object.assign(Revert, {
5056function Remove ( ) { }
5157
5258Remove . prototype = {
53- onSpill ( dragEl ) {
54- this . sortable . captureAnimationState ( ) ;
59+ onSpill ( { dragEl, putSortable } ) {
60+ const parentSortable = putSortable || this . sortable ;
61+ parentSortable . captureAnimationState ( ) ;
5562 dragEl . parentNode && dragEl . parentNode . removeChild ( dragEl ) ;
56- this . sortable . animateAll ( ) ;
63+ parentSortable . animateAll ( ) ;
5764 } ,
5865 drop
5966} ;
0 commit comments