diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js index 924112373bd..54dbd1907cc 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic.js +++ b/app/assets/javascripts/discourse/app/controllers/topic.js @@ -847,7 +847,7 @@ export default Controller.extend(bufferedProperty("model"), { opts?.action === Composer.EDIT && composerModel?.draftKey === opts.draftKey; if (editingExisting) { - composerModel.set("composeState", Composer.OPEN); + composer.unshrink(); return; } diff --git a/app/assets/javascripts/discourse/app/services/composer.js b/app/assets/javascripts/discourse/app/services/composer.js index a6d7cc3d2cc..05cd5f462a1 100644 --- a/app/assets/javascripts/discourse/app/services/composer.js +++ b/app/assets/javascripts/discourse/app/services/composer.js @@ -1697,6 +1697,14 @@ export default class ComposerService extends Service { }); } + unshrink() { + this.model.set("composeState", Composer.OPEN); + document.documentElement.style.setProperty( + "--composer-height", + this.model.composerHeight + ); + } + shrink() { if ( this.get("model.replyDirty") ||