mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Add anchorScroll with redraw after loadPromise loads in scrollToItem
This commit is contained in:
committed by
Franz Liedke
parent
ac1eef7578
commit
9572863648
@@ -3,6 +3,7 @@ import ScrollListener from '../../common/utils/ScrollListener';
|
||||
import PostLoading from './LoadingPost';
|
||||
import ReplyPlaceholder from './ReplyPlaceholder';
|
||||
import Button from '../../common/components/Button';
|
||||
import anchorScroll from '../../common/utils/anchorScroll';
|
||||
|
||||
/**
|
||||
* The `PostStream` component displays an infinitely-scrollable wall of posts in
|
||||
@@ -339,6 +340,9 @@ export default class PostStream extends Component {
|
||||
}
|
||||
|
||||
return $container.promise().then(() => {
|
||||
this.state.loadPromise.then(() => {
|
||||
anchorScroll($item[0], () => m.redraw(true));
|
||||
});
|
||||
this.state.unpause();
|
||||
this.calculatePosition();
|
||||
this.updateScrubber();
|
||||
|
Reference in New Issue
Block a user