1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

update: IndexPage (move onunload contents into onremove)

This commit is contained in:
Alexander Skvortsov
2020-08-09 19:08:09 -04:00
committed by Franz Liedke
parent 3596425bde
commit 46e704b27b

View File

@@ -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();
}
/**