$.each(inst.sortables, function() {
if (this.instance.isOver) {
-
this.instance.isOver = 0;
// Allow this sortable to handle removing the helper
//Trigger the stop of the sortable
this.instance._mouseStop(event);
+ // Once drag has ended, the sortable should return to using
+ // its original helper, not the shared helper from draggable
this.instance.options.helper = this.instance.options._helper;
} else {
return ui.helper[ 0 ];
};
- // Fire the start event of the sortable with our passed browser event,
+ // Fire the start events of the sortable with our passed browser event,
// and our own helper (so it doesn't create a new one)
event.target = sortable.currentItem[ 0 ];
sortable._mouseCapture( event, true );
draggable._trigger( "toSortable", event );
- // draggable revert needs this variable
+ // Inform draggable that the helper is in a valid drop zone,
+ // used solely in the revert option to handle "valid/invalid".
draggable.dropped = sortable.element;
// hack so receive/update callbacks work (mostly)
sortable.options.revert = false;
sortable._trigger( "out", event, sortable._uiHash( sortable ) );
-
sortable._mouseStop( event, true );
// restore sortable behaviors that were modfied
draggable._trigger( "fromSortable", event );
- // draggable revert needs that
+ // Inform draggable that the helper is no longer in a valid drop zone
draggable.dropped = false;
}
}