I wanted to know if there is a way I can abort the default drop operation in dojo. I am doing some custom manipulation in the function,
dojo.subscribe("/dnd/drop/before", function(source, nodes, iscopy){
//Custom manipulation
});
And from this function, I want to cancel the drop, similar to what happens when you press the Esc Key?
Thanks
You can publish the topic
dnd/cancel, i.e.dojo.publish('/dnd/cancel'), then calldojo.dnd.manager().stopDrag()to cancel the drop.But the recommended way is to customize the
checkAcceptance()ofdojo.dnd.Sourceto returnfalsewhen current node is not droppable. Find more details in dojo dnd’s doc.