summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-02-04 11:28:40 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-02-04 14:49:10 -0500
commiteec9f88110a83083ecd68a1d33e36a65b373bdc5 (patch)
tree2b4248c6ee70413da9861d1112307e1884fd264e /web/react/components
parent9adc80c3fc5dfbf9b4ca2e16fd428599571a03ca (diff)
downloadchat-eec9f88110a83083ecd68a1d33e36a65b373bdc5.tar.gz
chat-eec9f88110a83083ecd68a1d33e36a65b373bdc5.tar.bz2
chat-eec9f88110a83083ecd68a1d33e36a65b373bdc5.zip
Updated RHS textbox to refocus after clicking to upload a file
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/create_comment.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 8c49315e7..387d5bd8b 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -51,6 +51,7 @@ class CreateComment extends React.Component {
this.commentMsgKeyPress = this.commentMsgKeyPress.bind(this);
this.handleUserInput = this.handleUserInput.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
+ this.handleUploadClick = this.handleUploadClick.bind(this);
this.handleUploadStart = this.handleUploadStart.bind(this);
this.handleFileUploadComplete = this.handleFileUploadComplete.bind(this);
this.handleUploadError = this.handleUploadError.bind(this);
@@ -218,6 +219,9 @@ class CreateComment extends React.Component {
});
}
}
+ handleUploadClick() {
+ this.refs.textbox.focus();
+ }
handleUploadStart(clientIds) {
let draft = PostStore.getCommentDraft(this.props.rootId);
@@ -365,6 +369,7 @@ class CreateComment extends React.Component {
<FileUpload
ref='fileUpload'
getFileCount={this.getFileCount}
+ onClick={this.handleUploadClick}
onUploadStart={this.handleUploadStart}
onFileUpload={this.handleFileUploadComplete}
onUploadError={this.handleUploadError}