FIX: ESC to dismiss empty draft topic composer

Previously originalTitle was set to undefined leading to
titleDirty being unconditionally undefined for new topics

That mean you could not dismiss the composer via ESC
This commit is contained in:
Sam Saffron 2020-05-11 10:04:38 +10:00
parent 8f5a651e51
commit 44712c5f98
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 3 additions and 0 deletions

View File

@ -785,11 +785,14 @@ const Composer = RestModel.extend({
});
}
this.set("originalTitle", "");
if (opts.title) {
this.set("title", opts.title);
}
this.set("originalText", opts.draft ? "" : this.reply);
if (this.editingFirstPost) {
this.set("originalTitle", this.title);
}