From c11446657f96a155a5dd0790357c992ed719973e Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 4 Feb 2016 11:32:39 -0500
Subject: Added code to refocus on the post/comment textbox after a file is
 drag and dropped

---
 web/react/components/create_comment.jsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'web/react/components/create_comment.jsx')

diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 387d5bd8b..797b98ce2 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -229,6 +229,10 @@ class CreateComment extends React.Component {
         PostStore.storeCommentDraft(this.props.rootId, draft);
 
         this.setState({uploadsInProgress: draft.uploadsInProgress});
+
+        // this is a bit redundant with the code that sets focus when the file input is clicked,
+        // but this also resets the focus after a drag and drop
+        this.refs.textbox.focus();
     }
     handleFileUploadComplete(filenames, clientIds) {
         let draft = PostStore.getCommentDraft(this.props.rootId);
-- 
cgit v1.2.3-1-g7c22

