mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 03:47:01 +00:00
ref
This commit is contained in:
@@ -104,7 +104,7 @@ class EditModalView extends ModalView {
|
||||
this.actionSaveAndContinueEditing();
|
||||
},
|
||||
/** @this EditModalView */
|
||||
'Escape': function (e) {
|
||||
'Escape': async function (e) {
|
||||
if (this.saveDisabled) {
|
||||
return;
|
||||
}
|
||||
@@ -120,13 +120,14 @@ class EditModalView extends ModalView {
|
||||
this.model.set(focusedFieldView.fetch(), {skipReRender: true});
|
||||
}
|
||||
|
||||
if (this.getRecordView().isChanged) {
|
||||
this.confirm(this.translate('confirmLeaveOutMessage', 'messages'))
|
||||
.then(() => this.actionClose());
|
||||
if (!this.getRecordView().isChanged) {
|
||||
this.actionClose();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await this.confirm(this.translate('confirmLeaveOutMessage', 'messages'));
|
||||
|
||||
this.actionClose();
|
||||
},
|
||||
/** @this EditModalView */
|
||||
|
||||
Reference in New Issue
Block a user