diff --git a/.gitignore b/.gitignore index 8fa39a63..70f48d19 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ npm-debug.log* yarn-error.log testem.log +.idea # ember-try .node_modules.ember-try/ diff --git a/addon/system/drag-listener.js b/addon/system/drag-listener.js index 53d0d078..27a518f9 100644 --- a/addon/system/drag-listener.js +++ b/addon/system/drag-listener.js @@ -91,15 +91,15 @@ export default class { getEventSource(evt) { let types = evt.dataTransfer.types || []; - let areAllTypesFiles = true; + let areSomeTypesFiles = false; for (let i = 0, len = types.length; i < len; i++) { - if (types[i] !== 'Files' && - types[i] !== 'application/x-moz-file') { - areAllTypesFiles = false; + if (types[i] === 'Files' || + types[i] === 'application/x-moz-file') { + areSomeTypesFiles = true; break; } } - return areAllTypesFiles ? 'os' : 'web'; + return areSomeTypesFiles ? 'os' : 'web'; } dragenter(evt) {