From 6ae34644840f9a99769ec5b3fc44b98690a215fc Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 4 Apr 2017 12:25:55 -0400 Subject: Fixed pasting images not working (#5971) --- webapp/components/create_comment.jsx | 6 ++++++ webapp/components/create_post.jsx | 6 ++++++ webapp/components/file_upload.jsx | 9 +++++---- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'webapp') 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 {