[dojo-contributors] Proper way to cancel a 0.9 DnD event

Jeff Chimene jchimene at gmail.com
Thu Aug 16 04:40:29 EDT 2007


Eugene Lazutkin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jeff Chimene wrote:
>   
>> Hi,
>>
>> What's the proper way to cancel a DnD event?
>>     
>
> You need to do 2 things (assuming you use the trunk):
>
> 1) Be nice and notify everybody that the drag is canceled:
>
> dojo.publish("/dnd/cancel");
>
> 2) Stop the drag:
>
> dojo.dnd.manager().stopDrag();
>   

Hi Eugene,

OK, I got this far... However, selecting another item from the source 
container, yields the error "this.avatar has no properties". In 
addition, the original item is still selected.

Suggestions welcome...

I can post the current code if that would help...

Cheers,
jec



More information about the dojo-contributors mailing list