From bb7006bda1fac9b261944a51e497569cfcf2d1be Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Tue, 28 Mar 2017 14:17:24 +0200
Subject: Hide drag & drop area on drop event regardless of success

---
 app/assets/javascripts/components/features/ui/index.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/components/features/ui/index.jsx')

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));
     }
   },
-- 
cgit 

