diff options
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r-- | webapp/components/create_post.jsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 317b05f66..581ed16a0 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -46,7 +46,7 @@ export default class CreatePost extends React.Component { this.handleSubmit = this.handleSubmit.bind(this); this.postMsgKeyPress = this.postMsgKeyPress.bind(this); this.handleChange = this.handleChange.bind(this); - this.handleUploadClick = this.handleUploadClick.bind(this); + this.handleFileUploadChange = this.handleFileUploadChange.bind(this); this.handleUploadStart = this.handleUploadStart.bind(this); this.handleFileUploadComplete = this.handleFileUploadComplete.bind(this); this.handleUploadError = this.handleUploadError.bind(this); @@ -244,8 +244,8 @@ export default class CreatePost extends React.Component { PostStore.storeCurrentDraft(draft); } - handleUploadClick() { - this.focusTextbox(); + handleFileUploadChange() { + this.focusTextbox(true); } handleUploadStart(clientIds, channelId) { @@ -337,6 +337,8 @@ export default class CreatePost extends React.Component { const enableSendButton = this.handleEnableSendButton(this.state.message, fileInfos); this.setState({fileInfos, uploadsInProgress, enableSendButton}); + + this.handleFileUploadChange(); } componentWillMount() { @@ -577,7 +579,7 @@ export default class CreatePost extends React.Component { <FileUpload ref='fileUpload' getFileCount={this.getFileCount} - onClick={this.handleUploadClick} + onFileUploadChange={this.handleFileUploadChange} onUploadStart={this.handleUploadStart} onFileUpload={this.handleFileUploadComplete} onUploadError={this.handleUploadError} |