diff options
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r-- | webapp/components/create_comment.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index 8aa26882b..3dd1ac924 100644 --- a/webapp/components/create_comment.jsx +++ b/webapp/components/create_comment.jsx @@ -51,6 +51,7 @@ export default class CreateComment extends React.Component { this.handleUploadError = this.handleUploadError.bind(this); this.removePreview = this.removePreview.bind(this); this.getFileCount = this.getFileCount.bind(this); + this.getFileUploadTarget = this.getFileUploadTarget.bind(this); this.onPreferenceChange = this.onPreferenceChange.bind(this); this.focusTextbox = this.focusTextbox.bind(this); this.showPostDeletedModal = this.showPostDeletedModal.bind(this); @@ -497,6 +498,10 @@ export default class CreateComment extends React.Component { return this.state.fileInfos.length + this.state.uploadsInProgress.length; } + getFileUploadTarget() { + return this.refs.textbox; + } + focusTextbox(keepFocus = false) { if (keepFocus || !Utils.isMobile()) { this.refs.textbox.focus(); @@ -612,6 +617,7 @@ export default class CreateComment extends React.Component { <FileUpload ref='fileUpload' getFileCount={this.getFileCount} + getTarget={this.getFileUploadTarget} onFileUploadChange={this.handleFileUploadChange} onUploadStart={this.handleUploadStart} onFileUpload={this.handleFileUploadComplete} |