about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-28 14:17:24 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-03-28 14:17:24 +0200
commitbb7006bda1fac9b261944a51e497569cfcf2d1be (patch)
tree8634c754d748341d25875d4c20707d2fcdb5fd8b /app
parent139fc994e218f3d2e95f38d5f6dae11e8b0b8d58 (diff)
Hide drag & drop area on drop event regardless of success
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/components/features/ui/index.jsx3
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));
     }
   },