Jquery:
$(document).ready(function () {
$('input[type=file]').uploadImage();
jQuery.event.props.push('dataTransfer');
$(".upload-cont").bind('dragenter', function (e) {
$(".upload-cont").css("border", "1px dashed black;");
});
$(".upload-cont").bind('drop', function (e) {
var files = e.dataTransfer.files;
e.preventDefault();
});
$("body").bind('drop', function (e) {
e.preventDefault();
});
});
In firefox 17,explorer 8 when dragging and dropping a file from desktop into browser the image will be loaded in another page. I had added preventDefault() which works perfectly in chrome. What can be done so that the action is prevented in ff,ie browser.
Try changing the code to be.
The dragover event has to be cancelled also for certain browser to listen to the drop. To quote the mdn