PLT-5025: Fix scroll to bottom delay loading channel. (#5056)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d64d51a632
Коммит
07bad4d6d5
@@ -421,6 +421,11 @@ export default class PostList extends React.Component {
|
|||||||
this.scrollToBottom();
|
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) {
|
} else if (this.props.scrollType === ScrollTypes.POST && this.props.scrollPostId) {
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
const postNode = ReactDOM.findDOMNode(this.refs[this.props.scrollPostId]);
|
const postNode = ReactDOM.findDOMNode(this.refs[this.props.scrollPostId]);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user