diff --git a/app/assets/javascripts/discourse/controllers/queued-post.js.es6 b/app/assets/javascripts/discourse/controllers/queued-post.js.es6 index 588e14711c0..a64cd8b25b2 100644 --- a/app/assets/javascripts/discourse/controllers/queued-post.js.es6 +++ b/app/assets/javascripts/discourse/controllers/queued-post.js.es6 @@ -13,27 +13,28 @@ function updateState(state) { export default Ember.Controller.extend(BufferedContent, { needs: ['queued-posts'], post: Ember.computed.alias('model'), + currentlyEditing: Ember.computed.alias('controllers.queued-posts.editing'), - editing: false, + editing: Discourse.computed.propertyEqual('model', 'currentlyEditing'), actions: { approve: updateState('approved'), reject: updateState('rejected'), edit() { - this.set('editing', true); + this.set('currentlyEditing', this.get('model')); }, confirmEdit() { this.get('post').update({ raw: this.get('buffered.raw') }).then(() => { this.commitBuffer(); - this.set('editing', false); + this.set('currentlyEditing', null); }); }, cancelEdit() { this.rollbackBuffer(); - this.set('editing', false); + this.set('currentlyEditing', null); } } });