composer email modal collapse not leave out

This commit is contained in:
Yuri Kuznetsov
2025-06-16 10:44:16 +03:00
parent 133d6144ad
commit 8cfc2321d1
+4 -1
View File
@@ -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();