mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 15:43:59 +08:00
Fix discussion list scroll position not being maintained when hero is not visible
This commit is contained in:
parent
83cdea35ea
commit
4365fa3c52
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user