How can I cancel the default action when the 'drop' occurs using Dojo dnd -
i using dojo/dnd/source.in application, drag item source target,and under conditions,i want cancel default action when or before drop it.
i tried return false in ondrop handler,but doesn't work. tried "this.emit('dndcancel')",and doesn't work neither.
mytarget.on("drop",function(source,nodes,copy){ this.emit("dndcancel"); return false; }
what should do?please
thanks!
try dojo publish:
require(['dojo/topic'], function(topic) { topic.publish("/dnd/cancel"); }
Comments
Post a Comment