mirror of
https://github.com/flarum/core.git
synced 2025-07-12 20:36:28 +02:00
Fix discussion list scroll position not being maintained when hero is not visible
This commit is contained in:
@ -102,7 +102,7 @@ export default class IndexPage extends Page {
|
|||||||
// previous hero. Maintain the same scroll position relative to the bottom
|
// previous hero. Maintain the same scroll position relative to the bottom
|
||||||
// of the hero so that the sidebar doesn't jump around.
|
// of the hero so that the sidebar doesn't jump around.
|
||||||
const oldHeroHeight = app.cache.heroHeight;
|
const oldHeroHeight = app.cache.heroHeight;
|
||||||
const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight();
|
const heroHeight = app.cache.heroHeight = this.$('.Hero').outerHeight() || 0;
|
||||||
const scrollTop = app.cache.scrollTop;
|
const scrollTop = app.cache.scrollTop;
|
||||||
|
|
||||||
$('#app').css('min-height', $(window).height() + heroHeight);
|
$('#app').css('min-height', $(window).height() + heroHeight);
|
||||||
|
Reference in New Issue
Block a user