mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Anchor scroll after loading posts
This commit is contained in:
committed by
Franz Liedke
parent
e84960dcd1
commit
514165c3af
@@ -332,7 +332,7 @@ class PostStreamState {
|
|||||||
page: { near: number },
|
page: { near: number },
|
||||||
})
|
})
|
||||||
.then(this.show.bind(this))
|
.then(this.show.bind(this))
|
||||||
.then(() => m.redraw());
|
.then(() => anchorScroll($(`.PostStream-item[data-number="${number}"]`), () => m.redraw(true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -356,7 +356,7 @@ class PostStreamState {
|
|||||||
|
|
||||||
return this.loadRange(start, end)
|
return this.loadRange(start, end)
|
||||||
.then(this.show.bind(this))
|
.then(this.show.bind(this))
|
||||||
.then(() => m.redraw());
|
.then(() => anchorScroll($(`.PostStream-item[data-index="${index}"]`), () => m.redraw(true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user