diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-13 14:15:32 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-13 14:15:32 -0500 |
commit | f0b1adf6cfaf0f2825b514d2c5e132ebf583652b (patch) | |
tree | 0bdb4439993b44f7106436b23e7ee015093b1769 /web/react/components | |
parent | c5c96082c5b076d4776e18503d9317cdaeb6066c (diff) | |
parent | cd82de18f5c47f1dcc0e6e31af9d17c1ff0b1136 (diff) | |
download | chat-f0b1adf6cfaf0f2825b514d2c5e132ebf583652b.tar.gz chat-f0b1adf6cfaf0f2825b514d2c5e132ebf583652b.tar.bz2 chat-f0b1adf6cfaf0f2825b514d2c5e132ebf583652b.zip |
Merge release branch 'release-1.2'
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/more_direct_channels.jsx | 4 | ||||
-rw-r--r-- | web/react/components/post_attachment.jsx | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index 40deb37f2..d1265f67e 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -50,6 +50,10 @@ export default class MoreDirectChannels extends React.Component { handleFilterChange() { const filter = ReactDOM.findDOMNode(this.refs.filter).value; + if ($(window).width() > 768) { + $(ReactDOM.findDOMNode(this.refs.userList)).scrollTop(0); + } + if (filter !== this.state.filter) { this.setState({filter}); } diff --git a/web/react/components/post_attachment.jsx b/web/react/components/post_attachment.jsx index 2d6b47f03..cf65dfbfb 100644 --- a/web/react/components/post_attachment.jsx +++ b/web/react/components/post_attachment.jsx @@ -50,7 +50,8 @@ export default class PostAttachment extends React.Component { } shouldCollapse() { - return (this.props.attachment.text.match(/\n/g) || []).length >= 5 || this.props.attachment.text.length > 700; + const text = this.props.attachment.text || ''; + return (text.match(/\n/g) || []).length >= 5 || text.length > 700; } getCollapsedText() { @@ -292,4 +293,4 @@ export default class PostAttachment extends React.Component { PostAttachment.propTypes = { attachment: React.PropTypes.object.isRequired -};
\ No newline at end of file +}; |