Skip to content

EspoCRM – Open Source CRM Application

fix double shortcut issue

Yuri Kuznetsov03ac0a57c8aa
diff --git a/client/src/views/modals/compose-email.js b/client/src/views/modals/compose-email.js
index ed8e88e67f..0ff9d2f3c7 100644
--- a/client/src/views/modals/compose-email.js
+++ b/client/src/views/modals/compose-email.js
@@ -42,7 +42,7 @@ class ComposeEmailModalView extends EditModalView {
shortcutKeys = {
/** @this ComposeEmailModalView */
'Control+Enter': function (e) {
- if (this.buttonList.findIndex(item => item.name === 'send' && !item.hidden) === -1) {
+ if (this.buttonList.findIndex(item => item.name === 'send' && !item.hidden && !item.disabled) === -1) {
return;
}
diff --git a/client/src/views/modals/edit.js b/client/src/views/modals/edit.js
index b48251bbc0..2f064b5e61 100644
--- a/client/src/views/modals/edit.js
+++ b/client/src/views/modals/edit.js
@@ -73,7 +73,7 @@ class EditModalView extends ModalView {
return;
}
- if (this.buttonList.findIndex(item => item.name === 'save' && !item.hidden) === -1) {
+ if (this.buttonList.findIndex(item => item.name === 'save' && !item.hidden && !item.disabled) === -1) {
return;
}
@@ -93,7 +93,7 @@ class EditModalView extends ModalView {
return;
}
- if (this.buttonList.findIndex(item => item.name === 'save' && !item.hidden) === -1) {
+ if (this.buttonList.findIndex(item => item.name === 'save' && !item.hidden && !item.disabled) === -1) {
return;
}