Skip to content

Commit

Permalink
Defer clearing discussion list on discussion start
Browse files Browse the repository at this point in the history
This prevents an edge case where `app.discussions` is considered empty while the new page is loading, and as a result, the side pane isn't set as "enabled". Then, if the pane has previously been pinned, when the page loads and the side pane appears, it covers up part of the discussion page.

Fixes #2471
  • Loading branch information
askvortsov1 committed Nov 26, 2020
1 parent d09d4bc commit 102e76b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/forum/components/DiscussionComposer.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class DiscussionComposer extends ComposerBody {
.save(data)
.then((discussion) => {
this.composer.hide();
app.discussions.refresh();
app.discussions.refresh({ deferClear: true });
m.route.set(app.route.discussion(discussion));
}, this.loaded.bind(this));
}
Expand Down

0 comments on commit 102e76b

Please sign in to comment.