I would like to disable the option to drag and drop files to a webpage in IE 8. Currently the behavior is that IE 8 tries to open the file.
I am using JQuery and this code:
$(document).ready(function() {
$('body').on('drop dragover', function(e) {
e.preventDefault(); // for everything else - this works but not for IE 8
e.returnValue = false; // for IE 8 - but this does not work
});
});
update:
$(document).on('drop dragover', function(e) {
if(e.preventDefault){
e.preventDefault(); // for everything else - this works but not for IE 8
}
else{
e.returnValue = false; // for IE 8 - but this does not work
}
jsfiddle for Chrome to prove this works: https://jsfiddle.net/07qgw36b/