From 2d1670db82f70b0013d56ca907a57a0bb600e1df Mon Sep 17 00:00:00 2001 From: NguyenTranHoangSym <97150869+NguyenTranHoangSym@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:19:29 +0700 Subject: [PATCH] SDA-4394: Log wont be triggered as always while typing in RTE / Any input (#2016) --- src/app/window-handler.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 08e8cf2a3..7dfd5f4c5 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -253,6 +253,7 @@ export class WindowHandler { 'enableRendererLogs', 'enableBrowserLogin', 'browserLoginAutoConnect', + 'devToolsEnabled', ]); logger.info( `window-handler: main windows initialized with following config data`, @@ -461,7 +462,6 @@ export class WindowHandler { windowHandler.switchClient(clientSwitchType); }, SHORTCUT_KEY_THROTTLE); this.mainWebContents.on('before-input-event', (event, input) => { - const { devToolsEnabled } = config.getConfigFields(['devToolsEnabled']); const windowsDevTools = input.control && input.shift && input.key.toLowerCase() === 'i'; const macDevTools = @@ -469,7 +469,10 @@ export class WindowHandler { if (input.control && input.shift && input.key.toLowerCase() === 'd') { event.preventDefault(); throttledExportLogs(); - } else if (devToolsEnabled && (windowsDevTools || macDevTools)) { + } else if ( + this.config.devToolsEnabled && + (windowsDevTools || macDevTools) + ) { event.preventDefault(); this.mainWebContents?.toggleDevTools(); }