diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-04 12:25:55 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-04-04 12:25:55 -0400 |
commit | 6ae34644840f9a99769ec5b3fc44b98690a215fc (patch) | |
tree | 9f67d49bc78209d4d72afdeaf1556933850d84ea /webapp/components/create_post.jsx | |
parent | e2a8b3d47e76d30c43af2f4481e2c72eb6ca0e09 (diff) | |
download | chat-6ae34644840f9a99769ec5b3fc44b98690a215fc.tar.gz chat-6ae34644840f9a99769ec5b3fc44b98690a215fc.tar.bz2 chat-6ae34644840f9a99769ec5b3fc44b98690a215fc.zip |
Fixed pasting images not working (#5971)
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r-- | webapp/components/create_post.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index b33e5ea01..4ce6fc8ab 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -56,6 +56,7 @@ export default class CreatePost extends React.Component { this.onChange = this.onChange.bind(this); this.onPreferenceChange = this.onPreferenceChange.bind(this); this.getFileCount = this.getFileCount.bind(this); + this.getFileUploadTarget = this.getFileUploadTarget.bind(this); this.handleKeyDown = this.handleKeyDown.bind(this); this.handleBlur = this.handleBlur.bind(this); this.sendMessage = this.sendMessage.bind(this); @@ -456,6 +457,10 @@ export default class CreatePost extends React.Component { return draft.fileInfos.length + draft.uploadsInProgress.length; } + getFileUploadTarget() { + return this.refs.textbox; + } + handleKeyDown(e) { if (this.state.ctrlSend && e.keyCode === KeyCodes.ENTER && e.ctrlKey === true) { this.postMsgKeyPress(e); @@ -652,6 +657,7 @@ export default class CreatePost extends React.Component { <FileUpload ref='fileUpload' getFileCount={this.getFileCount} + getTarget={this.getFileUploadTarget} onFileUploadChange={this.handleFileUploadChange} onUploadStart={this.handleUploadStart} onFileUpload={this.handleFileUploadComplete} |