Merge pull request #294 from mozilla/invalidDragAndDrops
dealing with invalid drag and drops
This commit is contained in:
commit
83880d97e6
1 changed files with 4 additions and 0 deletions
|
@ -143,6 +143,10 @@ $(document).ready(function() {
|
||||||
|
|
||||||
let file = '';
|
let file = '';
|
||||||
if (event.type === 'drop') {
|
if (event.type === 'drop') {
|
||||||
|
if (!event.originalEvent.dataTransfer.files[0]) {
|
||||||
|
$('.upload-window').removeClass('ondrag');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
event.originalEvent.dataTransfer.files.length > 1 ||
|
event.originalEvent.dataTransfer.files.length > 1 ||
|
||||||
event.originalEvent.dataTransfer.files[0].size === 0
|
event.originalEvent.dataTransfer.files[0].size === 0
|
||||||
|
|
Loading…
Reference in a new issue