From 07bad4d6d518a9012a20fec8309cd625f57c7a8c Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 13 Jan 2017 15:03:12 +0000 Subject: PLT-5025: Fix scroll to bottom delay loading channel. (#5056) --- webapp/components/post_view/components/post_list.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx index 29358122b..06542d39c 100644 --- a/webapp/components/post_view/components/post_list.jsx +++ b/webapp/components/post_view/components/post_list.jsx @@ -421,6 +421,11 @@ export default class PostList extends React.Component { this.scrollToBottom(); } }); + + // This avoids the scroll jumping from top to bottom after the page has rendered (PLT-5025). + if (!this.refs.newMessageSeparator) { + this.scrollToBottom(); + } } else if (this.props.scrollType === ScrollTypes.POST && this.props.scrollPostId) { window.requestAnimationFrame(() => { const postNode = ReactDOM.findDOMNode(this.refs[this.props.scrollPostId]); -- cgit v1.2.3-1-g7c22