mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 11:35:29 +01:00
Update scroll top state on column mounting (#4276)
This commit is contained in:
parent
015269914e
commit
4f2513337f
@ -30,8 +30,8 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
|
||||
intersectionObserverWrapper = new IntersectionObserverWrapper();
|
||||
|
||||
handleScroll = debounce((e) => {
|
||||
const { scrollTop, scrollHeight, clientHeight } = e.target;
|
||||
handleScroll = debounce(() => {
|
||||
const { scrollTop, scrollHeight, clientHeight } = this.node;
|
||||
const offset = scrollHeight - scrollTop - clientHeight;
|
||||
this._oldScrollPosition = scrollHeight - scrollTop;
|
||||
|
||||
@ -49,6 +49,9 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
componentDidMount () {
|
||||
this.attachScrollListener();
|
||||
this.attachIntersectionObserver();
|
||||
|
||||
// Handle initial scroll posiiton
|
||||
this.handleScroll();
|
||||
}
|
||||
|
||||
componentDidUpdate (prevProps) {
|
||||
|
Loading…
Reference in New Issue
Block a user