jaysalvat / ezdz

A jQuery plugin to turn any standard input type file into a nice drag & drop zone with validators and previews.
MIT License
89 stars 36 forks source link

Update dragover function to check if user is dragging a file. #23

Closed phiter closed 6 years ago

phiter commented 6 years ago

Using a sorting plugin, I've noticed that when I dragged one ezdz on top of another, the enter class was being added.

This change will verify if the object that the user is dragging is a file and not an element.

Based on this answer: https://stackoverflow.com/a/8494918/4802649

jaysalvat commented 6 years ago

Thanks a lot!

Its seems Travis is broken and alerts on "All checks have failed". I will have to look at it before merging.

phiter commented 6 years ago

You can see the current behavior here: https://jsfiddle.net/tq2m1kzt/2/

Here is it working properly: https://jsfiddle.net/tq2m1kzt/3/