diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index c75936912..c15d158ad 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -465,6 +465,11 @@ export default DiscourseController.extend({ canEdit: function() { return this.get("model.action") === "edit" && Discourse.User.current().get("can_edit"); - }.property("model.action") + }.property("model.action"), + + visible: function() { + var state = this.get('model.composeState'); + return state && state !== 'closed'; + }.property('model.composeState') }); diff --git a/app/assets/javascripts/discourse/templates/composer.hbs b/app/assets/javascripts/discourse/templates/composer.hbs index db31e4adf..9d068ec8d 100644 --- a/app/assets/javascripts/discourse/templates/composer.hbs +++ b/app/assets/javascripts/discourse/templates/composer.hbs @@ -1,3 +1,4 @@ +{{#if visible}}
{{loading-spinner}}
@@ -116,3 +117,4 @@ +{{/if}}