mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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) {
|
bootbox.confirm(Em.String.i18n("post.abandon"), Em.String.i18n("no_value"), Em.String.i18n("yes_value"), function(result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
composerController.destroyDraft();
|
composerController.destroyDraft();
|
||||||
|
composerController.get('model').clearState();
|
||||||
composerController.close();
|
composerController.close();
|
||||||
promise.resolve();
|
promise.resolve();
|
||||||
} else {
|
} 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.action !== this.get('action') || ((opts.reply || opts.action === this.EDIT) && this.get('reply') !== this.get('originalText'))) &&
|
||||||
!opts.tested) {
|
!opts.tested) {
|
||||||
opts.tested = true;
|
opts.tested = true;
|
||||||
//composer.cancel(function() { composer.open(opts); });
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user