diff --git a/framework/core/js/forum/src/components/discussion-list.js b/framework/core/js/forum/src/components/discussion-list.js index fba5b8619..7c5255b20 100644 --- a/framework/core/js/forum/src/components/discussion-list.js +++ b/framework/core/js/forum/src/components/discussion-list.js @@ -125,7 +125,10 @@ export default class DiscussionList extends Component { var active = m.route().substr(0, discussionRoute.length) === discussionRoute; var subtree = this.subtrees[discussion.id()]; - return m('li.discussion-summary'+(isUnread ? '.unread' : '')+(active ? '.active' : ''), {key: discussion.id(), 'data-id': discussion.id()}, (subtree && subtree.retain()) || m('div', [ + return m('li.discussion-summary'+(isUnread ? '.unread' : '')+(active ? '.active' : ''), { + key: discussion.id(), + 'data-id': discussion.id() + }, (subtree && subtree.retain()) || m('div', [ controls.length ? DropdownButton.component({ items: controls, className: 'contextual-controls', diff --git a/framework/core/js/forum/src/components/discussion-page.js b/framework/core/js/forum/src/components/discussion-page.js index d6a475e0a..f92ffe7b6 100644 --- a/framework/core/js/forum/src/components/discussion-page.js +++ b/framework/core/js/forum/src/components/discussion-page.js @@ -38,10 +38,11 @@ export default class DiscussionPage extends mixin(Component, evented) { if (app.cache.discussionList) { if (!(app.current instanceof DiscussionPage)) { app.cache.discussionList.subtrees.map(subtree => subtree.invalidate()); + } else { + m.redraw.strategy('diff'); // otherwise pane redraws (killing retained subtrees) and mouseenter even is triggered so it doesn't hide } app.pane.enable(); app.pane.hide(); - m.redraw.strategy('diff'); // otherwise pane redraws and mouseenter even is triggered so it doesn't hide } app.history.push('discussion'); @@ -57,7 +58,9 @@ export default class DiscussionPage extends mixin(Component, evented) { params.include = params.include.join(','); app.store.find('discussions', m.route.param('id'), params).then(this.setupDiscussion.bind(this)); - m.redraw(); + // Trigger a redraw only if we're not already in a computation (e.g. route change) + m.startComputation(); + m.endComputation(); } params() {