I have a textarea that detects if an element (e. g. image file) is dragged over it.
// drag and drop for upload
$('body').on('dragover', 'textarea', function(e)
{
e.preventDefault();
e.stopPropagation();
// indicator for user
$('.drophere').show();
});
The problem is that the indicator to drop shows also up when text is dragged over the textarea (and not a file).
I thought I could check the type of the dragged item.
Where can I find the file type or plain/text type?
CodePudding user response:

