diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-07 14:18:46 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-04-07 19:18:46 +0100 |
commit | a56310ba8f4fb7d8de7bed2a6f10c8c603558311 (patch) | |
tree | 261cae57703c786e6847c6752df45bbe0a9fe0ee /webapp/components | |
parent | 1901adffa5f84bb818935bd737f1341c9eb725d3 (diff) | |
download | chat-a56310ba8f4fb7d8de7bed2a6f10c8c603558311.tar.gz chat-a56310ba8f4fb7d8de7bed2a6f10c8c603558311.tar.bz2 chat-a56310ba8f4fb7d8de7bed2a6f10c8c603558311.zip |
PLT-6200 Fixed file upload button not working on iOS (#6013)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/file_upload.jsx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/webapp/components/file_upload.jsx b/webapp/components/file_upload.jsx index d97b1ed3b..a0e7f5296 100644 --- a/webapp/components/file_upload.jsx +++ b/webapp/components/file_upload.jsx @@ -350,11 +350,16 @@ class FileUpload extends React.Component { const channelId = this.props.channelId || ChannelStore.getCurrentId(); const uploadsRemaining = Constants.MAX_UPLOAD_FILES - this.props.getFileCount(channelId); - const emojiSpan = (<span - className={'fa fa-smile-o icon--emoji-picker emoji-' + this.props.navBarName} - onClick={this.emojiClick} - />); - const filestyle = {visibility: 'hidden'}; + + let emojiSpan; + if (this.props.emojiEnabled) { + emojiSpan = ( + <span + className={'fa fa-smile-o icon--emoji-picker emoji-' + this.props.navBarName} + onClick={this.emojiClick} + /> + ); + } return ( <span @@ -363,20 +368,19 @@ class FileUpload extends React.Component { > <div className='icon--attachment'> <span + className='icon' dangerouslySetInnerHTML={{__html: Constants.ATTACHMENT_ICON_SVG}} - onClick={() => this.refs.fileInput.click()} /> <input ref='fileInput' type='file' - style={filestyle} onChange={this.handleChange} onClick={uploadsRemaining > 0 ? this.props.onClick : this.handleMaxUploadReached} multiple={multiple} accept={accept} /> </div> - {this.props.emojiEnabled ? emojiSpan : ''} + {emojiSpan} </span> ); } |