This is how I solved almost the same problem. In my case, when I switch node when dragging and dropping, the children are loaded via ajax and then they are initialized as droppables. Then I have to do this:
ui.draggable.draggable('option', 'refreshPositions', true);
var tempFunc = function() {
if (ui.draggable) {
ui.draggable.off('drag', tempFunc);
setTimeout(function() {
ui.draggable.draggable('option', 'refreshPositions', false);
}, 100);
}
};
ui.draggable.on('drag', tempFunc);
This causes draggable to have the parameter refreshPositionsas truelong enough so that new droppables join the current drag. You can also have a parameter refreshPositions trueduring the whole drag and drop, but this gives a performance penalty that I don't want.
-. , , , .