mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
wip fix: forum/components/DiscussionPage
- rename onunload to onremove. We are still unable to cancel the unload though.
This commit is contained in:
committed by
Franz Liedke
parent
f93a255a2f
commit
4402dc81ac
@@ -49,7 +49,7 @@ export default class DiscussionPage extends Page {
|
|||||||
this.bodyClass = 'App--discussion';
|
this.bodyClass = 'App--discussion';
|
||||||
}
|
}
|
||||||
|
|
||||||
onunload(e) {
|
onremove(vnode) {
|
||||||
// If we have routed to the same discussion as we were viewing previously,
|
// If we have routed to the same discussion as we were viewing previously,
|
||||||
// cancel the unloading of this controller and instead prompt the post
|
// cancel the unloading of this controller and instead prompt the post
|
||||||
// stream to jump to the new 'near' param.
|
// stream to jump to the new 'near' param.
|
||||||
@@ -57,7 +57,7 @@ export default class DiscussionPage extends Page {
|
|||||||
const idParam = m.route.param('id');
|
const idParam = m.route.param('id');
|
||||||
|
|
||||||
if (idParam && idParam.split('-')[0] === this.discussion.id()) {
|
if (idParam && idParam.split('-')[0] === this.discussion.id()) {
|
||||||
e.preventDefault();
|
//e.preventDefault();
|
||||||
|
|
||||||
const near = m.route.param('near') || '1';
|
const near = m.route.param('near') || '1';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user