|
@@ -3,6 +3,7 @@
|
|
|
*
|
|
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
|
+ * @author Christian Dominguez <christian.99dominguez@gmail.com>
|
|
|
*/
|
|
|
|
|
|
import { List } from 'immutable';
|
|
@@ -170,15 +171,15 @@ class Layout extends PluginUIComponent {
|
|
|
private showDragOverlay = new BehaviorSubject(false);
|
|
|
onDragEnter = (ev: React.DragEvent<HTMLDivElement>) => {
|
|
|
let hasFile = false;
|
|
|
- if (ev.dataTransfer.items) {
|
|
|
+ if (ev.dataTransfer.items && ev.dataTransfer.items.length > 0) {
|
|
|
for (let i = 0; i < ev.dataTransfer.items.length; i++) {
|
|
|
if (ev.dataTransfer.items[i].kind !== 'file') continue;
|
|
|
hasFile = true;
|
|
|
break;
|
|
|
}
|
|
|
} else {
|
|
|
- for (let i = 0; i < ev.dataTransfer.files.length; i++) {
|
|
|
- if (!ev.dataTransfer.files[i]) continue;
|
|
|
+ for (let i = 0; i < ev.dataTransfer.types.length; i++) {
|
|
|
+ if (ev.dataTransfer.types[i] !== 'Files') continue;
|
|
|
hasFile = true;
|
|
|
break;
|
|
|
}
|