mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Pass in a selector string to anchorScroll instead of a DOM element. Because the DOM element gets destroyed on redraw, it's offset height is interpreted as 0 which throws off our position in the stream.
This commit is contained in:
committed by
Franz Liedke
parent
9db2f78939
commit
0c63be527b
@@ -341,7 +341,7 @@ export default class PostStream extends Component {
|
||||
|
||||
return $container.promise().then(() => {
|
||||
this.state.loadPromise.then(() => {
|
||||
anchorScroll($item[0], () => m.redraw(true));
|
||||
anchorScroll(`.PostStream-item[data-index=${$item.data('index')}]`, () => m.redraw(true));
|
||||
});
|
||||
this.state.unpause();
|
||||
this.calculatePosition();
|
||||
|
Reference in New Issue
Block a user