Fixed buggy file upload container (#1841)

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
This commit is contained in:
waridrox
2021-03-12 09:54:49 +05:30
committed by GitHub
parent 5298d1e0ec
commit 417c1b1826
2 changed files with 10 additions and 4 deletions

View File

@@ -114,10 +114,10 @@ function setInputStepInit() {
dropzone[0].addEventListener('drop', handleFile, false);
dropzone.on('dragover', function onDragover(e) {
e.stopPropagation();
dropzone.addClass('hover');
e.preventDefault();
e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
}, false);
e.stopPropagation();
});
dropzone.on('dragenter', function onDragEnter(e) {
dropzone.addClass('hover');
@@ -127,6 +127,11 @@ function setInputStepInit() {
dropzone.removeClass('hover');
});
dropzone.on('drop', function onDrop(e) {
dropzone.removeClass('hover');
e.preventDefault();
});
};
}