forked from extern/egroupware
Remove drag enter/leave counter as it will break dragover class in FF
This commit is contained in:
parent
f26c9d73ca
commit
7914168502
@ -231,9 +231,8 @@
|
|||||||
loadFiles(e.dataTransfer.files, e);
|
loadFiles(e.dataTransfer.files, e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var counterDrag = 0;
|
|
||||||
var onDragLeave = function(e){
|
var onDragLeave = function(e){
|
||||||
if (--counterDrag == 0) e.currentTarget.classList.remove($.getOpt('dragOverClass'));
|
e.currentTarget.classList.remove($.getOpt('dragOverClass'));
|
||||||
};
|
};
|
||||||
var onDragOverEnter = function(e) {
|
var onDragOverEnter = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -242,7 +241,7 @@
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
dt.dropEffect = "copy";
|
dt.dropEffect = "copy";
|
||||||
dt.effectAllowed = "copy";
|
dt.effectAllowed = "copy";
|
||||||
if (e.type == 'dragenter' && counterDrag++ === 0) e.currentTarget.classList.add($.getOpt('dragOverClass'));
|
e.currentTarget.classList.add($.getOpt('dragOverClass'));
|
||||||
} else { // not work on IE/Edge....
|
} else { // not work on IE/Edge....
|
||||||
dt.dropEffect = "none";
|
dt.dropEffect = "none";
|
||||||
dt.effectAllowed = "none";
|
dt.effectAllowed = "none";
|
||||||
|
Loading…
Reference in New Issue
Block a user