diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-28 14:17:24 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-28 14:17:24 +0200 |
commit | bb7006bda1fac9b261944a51e497569cfcf2d1be (patch) | |
tree | 8634c754d748341d25875d4c20707d2fcdb5fd8b | |
parent | 139fc994e218f3d2e95f38d5f6dae11e8b0b8d58 (diff) |
Hide drag & drop area on drop event regardless of success
-rw-r--r-- | app/assets/javascripts/components/features/ui/index.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/ui/index.jsx b/app/assets/javascripts/components/features/ui/index.jsx index 10e989b2a..b7e8f32a4 100644 --- a/app/assets/javascripts/components/features/ui/index.jsx +++ b/app/assets/javascripts/components/features/ui/index.jsx @@ -50,8 +50,9 @@ const UI = React.createClass({ handleDrop (e) { e.preventDefault(); + this.setState({ draggingOver: false }); + if (e.dataTransfer && e.dataTransfer.files.length === 1) { - this.setState({ draggingOver: false }); this.props.dispatch(uploadCompose(e.dataTransfer.files)); } }, |