1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Don't use anchorScroll on goToNumber, instead scrolling directly to item

This commit is contained in:
Alexander Skvortsov
2020-07-07 15:58:56 -04:00
committed by Franz Liedke
parent d3fb5ee77c
commit 73507f403a

View File

@@ -365,7 +365,8 @@ export default class PostStream extends Component {
return $container.promise().then(() => {
this.state.loadPromise
.then(() => {
anchorScroll(`.PostStream-item[data-index=${$item.data('index')}]`, () => m.redraw(true));
m.redraw(true);
$(window).scrollTop($(`.PostStream-item[data-index=${$item.data('index')}]`).offset().top - this.getMarginTop());
})
.then(() => {
this.calculatePosition();