Skip to content

EspoCRM – Open Source CRM Application

modal shortcuts suppress

Yuri Kuznetsov680bae4fed6f
diff --git a/client/src/views/modal.js b/client/src/views/modal.js
index d3a554d980..8e10c7e5a8 100644
--- a/client/src/views/modal.js
+++ b/client/src/views/modal.js
@@ -457,11 +457,8 @@ class ModalView extends View {
* @private
*/
initShortcuts() {
- if (!this.shortcutKeys) {
- return;
- }
-
- this.shortcutManager.add(this, this.shortcutKeys, {stack: true});
+ // Shortcuts to be added even if there's no keys set – to suppress current shortcuts.
+ this.shortcutManager.add(this, this.shortcutKeys ?? {}, {stack: true});
this.once('remove', () => {
this.shortcutManager.remove(this);