filedrop-svelte icon indicating copy to clipboard operation
filedrop-svelte copied to clipboard

filedragenter/filedragleave are both emitted whilst in the drop zone

Open Conceptiks opened this issue 3 years ago • 2 comments

First mentioned here: #5 From what I can understand from the docs, I think filedragenter and filedragleave are emitted too often.

I assume that filedragenter should only be emitted once, when the user's cursor enters the dropzone while dragging some files. The reverse should be true for filedragleave.

In this REPL (fixed), you can observe the console logs by opening your DevTools. If you drag some files to the drop zone (don't release) and start moving your mouse up and down inside the drop zone, events are emitted (both enter and leave events).

Conceptiks avatar Jan 06 '22 16:01 Conceptiks

It seems to be caused by a dragenter/dragleave event firing for each element within the container. I'll get it fixed as soon as I get a chance.

Thank you for reporting it and for the repl.

chanced avatar Jan 07 '22 02:01 chanced

Ugh, I apologize I forgot about this.

chanced avatar May 31 '23 16:05 chanced