Fix drag'n drop issue
Added dragover event handler
This commit is contained in:
parent
fce557efd2
commit
745d5b3086
11
js/main.js
11
js/main.js
@ -118,14 +118,9 @@ $(document).ready(function(){
|
|||||||
.bind("mouseleave", lychee.hideControls);
|
.bind("mouseleave", lychee.hideControls);
|
||||||
|
|
||||||
/* Upload */
|
/* Upload */
|
||||||
document.documentElement.ondrop = function (e) {
|
$(document.documentElement)
|
||||||
|
.on("dragover", function(event) { event.preventDefault();}, false)
|
||||||
e.stopPropagation();
|
.on("drop", function (e) { e.stopPropagation(); e.preventDefault(); lychee.upload(event.dataTransfer.files); return true;});
|
||||||
e.preventDefault();
|
|
||||||
lychee.upload(event.dataTransfer.files);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Init */
|
/* Init */
|
||||||
lychee.ready();
|
lychee.ready();
|
||||||
|
Loading…
Reference in New Issue
Block a user