FIX: Clear state when you abandon.

This commit is contained in:
Robin Ward 2013-07-05 13:55:33 -04:00
parent d1a0b5dd44
commit 2e7eee7ebd
2 changed files with 1 additions and 1 deletions

View File

@ -304,6 +304,7 @@ Discourse.ComposerController = Discourse.Controller.extend({
bootbox.confirm(Em.String.i18n("post.abandon"), Em.String.i18n("no_value"), Em.String.i18n("yes_value"), function(result) {
if (result) {
composerController.destroyDraft();
composerController.get('model').clearState();
composerController.close();
promise.resolve();
} else {

View File

@ -305,7 +305,6 @@ Discourse.Composer = Discourse.Model.extend({
(opts.action !== this.get('action') || ((opts.reply || opts.action === this.EDIT) && this.get('reply') !== this.get('originalText'))) &&
!opts.tested) {
opts.tested = true;
//composer.cancel(function() { composer.open(opts); });
return;
}