From 8cfc2321d100df97fbfd4ee5caf5ce9f40d83a6f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 16 Jun 2025 10:44:16 +0300 Subject: [PATCH] composer email modal collapse not leave out --- client/src/views/modals/compose-email.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/views/modals/compose-email.js b/client/src/views/modals/compose-email.js index 036c52397f..f0f43a55af 100644 --- a/client/src/views/modals/compose-email.js +++ b/client/src/views/modals/compose-email.js @@ -300,7 +300,10 @@ class ComposeEmailModalView extends EditModalView { beforeCollapse() { if (this.wasModified) { this.actionSaveDraft({skipNotModifiedWarning: true}) - .then(() => this.getRecordView().setConfirmLeaveOut(false)); + .then(() => { + this.getRecordView().setConfirmLeaveOut(false); + this.getRouter().removeWindowLeaveOutObject(this); + }); } return super.beforeCollapse();