Armin Friedl
aad91c21f6
When dragging over a child element of the dropzone, a drag leave event from the dropzone is fired. This caused the handleDragLeave function to be called. Before the dragLeave event on the dropzone is fired, first a dragEnter event on the child is fired. By keeping a counter in the state, a premature dragLeave effect in the dropzone is prevented. The dragCount is kept in a local variable in handleOnDragLeave because only the render method gets the most recent state. Reading from state in a regular function will see an old value (and hence think it is still dragged over even though the counter dropped to 0). |
||
---|---|---|
.. | ||
fling |