mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +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(() => {
|
return $container.promise().then(() => {
|
||||||
this.state.loadPromise
|
this.state.loadPromise
|
||||||
.then(() => {
|
.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(() => {
|
.then(() => {
|
||||||
this.calculatePosition();
|
this.calculatePosition();
|
||||||
|
Reference in New Issue
Block a user