FIX: When adding a quote when the composer is closed, add a newline (#12049)

Normally we look at where the cursor is, but when the composer is closed
we don't have a cursor and just append at the end. This fix adds a new
line to make sure quotes will always work when inserted when the
composer is closed.
This commit is contained in:
Robin Ward 2021-02-11 12:45:20 -05:00 committed by GitHub
parent 12b57c0dee
commit 2068780493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,7 +339,7 @@ export default Controller.extend(bufferedProperty("model"), {
this.appEvents.trigger("composer:insert-block", quotedText);
} else if (composer.get("model.viewDraft")) {
const model = composer.get("model");
model.set("reply", model.get("reply") + quotedText);
model.set("reply", model.get("reply") + "\n" + quotedText);
composer.send("openIfDraft");
} else {
composer.open(composerOpts);