I\'m adding an html5 drag and drop uploader to my page.
When a file is dropped into the upload area, everything works great.
However, if I accidentally drop
For jQuery the correct answer will be:
$(document).on({ dragover: function() { return false; }, drop: function() { return false; } });
Here return false will behave as event.preventDefault() and event.stopPropagation().
return false
event.preventDefault()
event.stopPropagation()