EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
shortcut capture
Yuri Kuznetsov5ce71b0bcd58
diff --git a/client/src/helpers/site/shortcut-manager.js b/client/src/helpers/site/shortcut-manager.jsindex 18a917452d..9e4f1328ab 100644--- a/client/src/helpers/site/shortcut-manager.js+++ b/client/src/helpers/site/shortcut-manager.js@@ -53,7 +53,7 @@ export class ShortcutManager {constructor() {this.items = [];- document.addEventListener('keydown', event => this.handle(event));+ document.addEventListener('keydown', event => this.handle(event), {capture: true});}/**diff --git a/client/src/views/site/master.js b/client/src/views/site/master.jsindex f158db7606..5949fdf30a 100644--- a/client/src/views/site/master.js+++ b/client/src/views/site/master.js@@ -31,6 +31,8 @@import View from 'view';import $ from 'jquery';import CollapsedModalBarView from 'views/collapsed-modal-bar';+import {inject} from 'di';+import {ShortcutManager} from 'helpers/site/shortcut-manager';class MasterSiteView extends View {@@ -67,6 +69,16 @@ class MasterSiteView extends View {*/collapsedModalBarView++ /**+ * Injected to be loaded early.+ *+ * @private+ * @type {ShortcutManager}+ */+ @inject(ShortcutManager)+ shortcutManager+showLoadingNotification() {Espo.Ui.notifyWait();}