Tuch/angular-dnd

Dragenter run before dragleave

Tuch opened this issue · 1 comments

Tuch commented

If droppable-elements are right next to each other, the situation often arises when the dragenter event is invoked before the dragleave event. Because of this, there is an error in logic. ctrl.dropmodel overwritten with the new value, then the event is triggered dragleave with this value at the end of sets ctrl.dropmodel = undefined. As a result, we have a onedroppable-element in target array, but dropmodel = undefined.

See example: http://plnkr.co/edit/tdBHyg032OEK3Kn8ZQZw?p=preview