mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-5025: Fix scroll to bottom delay loading channel. (#5056)
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user