Skip to content

Commit a71baee

Browse files
committed
fxi drag send bug
1 parent 6da4b9c commit a71baee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/pages/Layout.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Offline from 'components/Offline';
2727
process: stores.chat.process,
2828
reconnect: stores.session.checkTimeout,
2929
close: () => stores.snackbar.toggle(false),
30-
canidrag: () => !!stores.chat.user || !stores.batchsend.show,
30+
canidrag: () => !!stores.chat.user && !stores.batchsend.show,
3131
}))
3232
@observer
3333
export default class Layout extends Component {
@@ -119,12 +119,12 @@ export default class Layout extends Component {
119119
};
120120

121121
window.ondrop = e => {
122-
var file = e.dataTransfer.files[0];
122+
var files = e.dataTransfer.files;
123123
e.preventDefault();
124124
e.stopPropagation();
125125

126-
if (file && canidrag()) {
127-
this.props.process(file);
126+
if (files.length && canidrag()) {
127+
Array.from(files).map(e => this.props.process(e));
128128
}
129129

130130
this.refs.holder.classList.remove(classes.show);

0 commit comments

Comments
 (0)