mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +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 },
|
||||
})
|
||||
.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)
|
||||
.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