I'm looking for a way to disable the possibility to drop text into a textarea. I need that because in Spotify it's possible for the user to drag Tracks, Playlists, etc. And the text representation is just a link.
At the moment we're using this code:
$(target).find('textarea').each(function(index, elem) {
elem.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
return false;
}, false);
elem.addEventListener('drop', function(e) {
a(_('messages', 'msgNoDragArea'));
e.preventDefault();
e.stopPropagation();
return false;
}, false);
});
Is there a way to remove the drop icon of the cursor when the user trys to drop an element? Via HTML attribute, CSS or Javascript?