From 49defa44f41f86b1535cfe837eb723f00de7cfc2 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 6 Dec 2023 14:04:58 +0200 Subject: [PATCH] fix email modal collapse confirmation leave out --- client/src/views/modals/compose-email.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/views/modals/compose-email.js b/client/src/views/modals/compose-email.js index 4728a832ef..23ae2cf3ec 100644 --- a/client/src/views/modals/compose-email.js +++ b/client/src/views/modals/compose-email.js @@ -292,11 +292,10 @@ class ComposeEmailModalView extends EditModalView { beforeCollapse() { if (this.wasModified) { - this.actionSaveDraft({skipNotModifiedWarning: true}); + this.actionSaveDraft({skipNotModifiedWarning: true}) + .then(() => this.getRecordView().setConfirmLeaveOut(false)); } - this.getRecordView().setConfirmLeaveOut(false); - return super.beforeCollapse(); } }