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

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -