mirror of
https://github.com/flarum/framework.git
synced 2025-01-31 14:08:30 +08:00
Slight PostStream scrubber improvement
After we scroll to a post, we redraw to render post content. We then update the scrubber again so its height is accurate. This commit moves that update to AFTER our adjustment of scroll position, so that scrubber height is based on actual post heights. This fixes some subtle scrubber glitches.
This commit is contained in:
parent
a3c419fba9
commit
edf350d80b
|
@ -359,9 +359,6 @@ export default class PostStream extends Component {
|
|||
|
||||
return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {
|
||||
m.redraw.sync();
|
||||
// We want to adjust this again after posts have been loaded in so that
|
||||
// the height of the scrubber is accurate.
|
||||
updateScrubberHeight();
|
||||
|
||||
// After post data has been loaded in, we will attempt to scroll back
|
||||
// to the top of the requested post (or to the top of the page if the
|
||||
|
@ -377,6 +374,10 @@ export default class PostStream extends Component {
|
|||
$(window).scrollTop($(`.PostStream-item[data-index=${index}]`).offset().top - this.getMarginTop());
|
||||
}
|
||||
|
||||
// We want to adjust this again after posts have been loaded in
|
||||
// and position adjusted so that the scrubber's height is accurate.
|
||||
updateScrubberHeight();
|
||||
|
||||
this.calculatePosition();
|
||||
this.stream.paused = false;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user