FIX: Clear state when you abandon.
This commit is contained in:
parent
d1a0b5dd44
commit
2e7eee7ebd
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue