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:
committed by
Franz Liedke
parent
d3fb5ee77c
commit
73507f403a
@@ -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();
|
||||
|
Reference in New Issue
Block a user