1
0
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:
Alexander Skvortsov
2020-07-06 20:13:31 -04:00
committed by Franz Liedke
parent e84960dcd1
commit 514165c3af

View File

@@ -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)));
} }
/** /**