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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -