mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Fix dragover class flickering issue
This commit is contained in:
parent
12f3e9defd
commit
5877f3d0f1
@ -231,8 +231,9 @@
|
||||
loadFiles(e.dataTransfer.files, e);
|
||||
}
|
||||
};
|
||||
var counterDrag = 0;
|
||||
var onDragLeave = function(e){
|
||||
e.currentTarget.classList.remove($.getOpt('dragOverClass'));
|
||||
if (--counterDrag == 0) e.currentTarget.classList.remove($.getOpt('dragOverClass'));
|
||||
};
|
||||
var onDragOverEnter = function(e) {
|
||||
e.preventDefault();
|
||||
@ -241,7 +242,7 @@
|
||||
e.stopPropagation();
|
||||
dt.dropEffect = "copy";
|
||||
dt.effectAllowed = "copy";
|
||||
e.currentTarget.classList.add($.getOpt('dragOverClass'));
|
||||
if (e.type == 'dragenter' && counterDrag++ === 0) e.currentTarget.classList.add($.getOpt('dragOverClass'));
|
||||
} else { // not work on IE/Edge....
|
||||
dt.dropEffect = "none";
|
||||
dt.effectAllowed = "none";
|
||||
|
Loading…
Reference in New Issue
Block a user