diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-14 09:08:13 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-14 09:08:13 -0600 |
commit | 6d6cada0970a2b341f36dac9b0fed8262ada1865 (patch) | |
tree | fc3728f15deaebd0c870838a63735659a33456e7 /web/react/components/posts_view.jsx | |
parent | 0b986ed3147c885af6b2f33e1ff3eb6754e8f274 (diff) | |
parent | a341dbad2b8a4564b6f270c79f2f9932e499ac80 (diff) | |
download | chat-6d6cada0970a2b341f36dac9b0fed8262ada1865.tar.gz chat-6d6cada0970a2b341f36dac9b0fed8262ada1865.tar.bz2 chat-6d6cada0970a2b341f36dac9b0fed8262ada1865.zip |
Merge branch 'master' into PLT-1429
Diffstat (limited to 'web/react/components/posts_view.jsx')
-rw-r--r-- | web/react/components/posts_view.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx index a28efbd04..7d8c7e265 100644 --- a/web/react/components/posts_view.jsx +++ b/web/react/components/posts_view.jsx @@ -24,6 +24,7 @@ export default class PostsView extends React.Component { this.updateScrolling = this.updateScrolling.bind(this); this.handleResize = this.handleResize.bind(this); this.scrollToBottom = this.scrollToBottom.bind(this); + this.scrollToBottomAnimated = this.scrollToBottomAnimated.bind(this); this.jumpToPostNode = null; this.wasAtBottom = true; @@ -339,6 +340,10 @@ export default class PostsView extends React.Component { this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; }); } + scrollToBottomAnimated() { + var postList = $(this.refs.postlist); + postList.animate({scrollTop: this.refs.postlist.scrollHeight}, '500'); + } componentDidMount() { if (this.props.postList != null) { this.updateScrolling(); @@ -458,7 +463,7 @@ export default class PostsView extends React.Component { <ScrollToBottomArrows isScrolling={this.state.isScrolling} atBottom={this.wasAtBottom} - onClick={this.scrollToBottom} + onClick={this.scrollToBottomAnimated} /> <div ref='postlist' |