summaryrefslogtreecommitdiffstats
path: root/web/react/components/posts_view.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-01-11 09:57:27 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-01-11 09:57:27 -0500
commit01d6a48419d351f92c40f8ed9352fa203cc46e4a (patch)
tree621648425e7d6d973ef3cb1e25651e928b5d6bef /web/react/components/posts_view.jsx
parent7aa7f83524c06b6e0a9ec2274d4ac4744a83bda8 (diff)
parent7f1f7885e73b2e54b590adc2207d807cf72b3843 (diff)
downloadchat-01d6a48419d351f92c40f8ed9352fa203cc46e4a.tar.gz
chat-01d6a48419d351f92c40f8ed9352fa203cc46e4a.tar.bz2
chat-01d6a48419d351f92c40f8ed9352fa203cc46e4a.zip
Merge pull request #1822 from asaadmahmoodspin/ui-improvements
Multiple UI Improvements
Diffstat (limited to 'web/react/components/posts_view.jsx')
-rw-r--r--web/react/components/posts_view.jsx7
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'