mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
update: IndexPage (move onunload contents into onremove)
This commit is contained in:
committed by
Franz Liedke
parent
3596425bde
commit
46e704b27b
@@ -44,12 +44,6 @@ export default class IndexPage extends Page {
|
||||
this.bodyClass = 'App--index';
|
||||
}
|
||||
|
||||
onunload() {
|
||||
// Save the scroll position so we can restore it when we return to the
|
||||
// discussion list.
|
||||
app.cache.scrollTop = $(window).scrollTop();
|
||||
}
|
||||
|
||||
view() {
|
||||
return (
|
||||
<div className="IndexPage">
|
||||
@@ -117,6 +111,10 @@ export default class IndexPage extends Page {
|
||||
super.onremove(vnode);
|
||||
|
||||
$('#app').css('min-height', '');
|
||||
|
||||
// Save the scroll position so we can restore it when we return to the
|
||||
// discussion list.
|
||||
app.cache.scrollTop = $(window).scrollTop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user