Fix drag'n drop issue

Added dragover event handler
This commit is contained in:
Luc Tribolet 2013-05-24 13:43:46 +02:00
parent fce557efd2
commit 745d5b3086

View File

@ -118,16 +118,11 @@ $(document).ready(function(){
.bind("mouseleave", lychee.hideControls);
/* Upload */
document.documentElement.ondrop = function (e) {
e.stopPropagation();
e.preventDefault();
lychee.upload(event.dataTransfer.files);
return true;
}
$(document.documentElement)
.on("dragover", function(event) { event.preventDefault();}, false)
.on("drop", function (e) { e.stopPropagation(); e.preventDefault(); lychee.upload(event.dataTransfer.files); return true;});
/* Init */
lychee.ready();
});
});