1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-25 07:37:16 +09:00

Hide drag & drop area on drop event regardless of success

This commit is contained in:
Eugen Rochko 2017-03-28 14:17:24 +02:00
parent 139fc994e2
commit bb7006bda1

View File

@ -50,8 +50,9 @@ const UI = React.createClass({
handleDrop (e) {
e.preventDefault();
if (e.dataTransfer && e.dataTransfer.files.length === 1) {
this.setState({ draggingOver: false });
if (e.dataTransfer && e.dataTransfer.files.length === 1) {
this.props.dispatch(uploadCompose(e.dataTransfer.files));
}
},