From 3271de09f891d7618c0caa8c884abad2df69a82c Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:42:14 -0300 Subject: [PATCH] fix: dev tools --- src/main/services/window-manager.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 45fd1097..3da47644 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -251,18 +251,21 @@ export class WindowManager { editorWindow.once("ready-to-show", () => { editorWindow.show(); - editorWindow.webContents.openDevTools(); + this.mainWindow?.webContents.openDevTools(); + if (isStaging) { + editorWindow.webContents.openDevTools(); + } }); editorWindow.webContents.on("before-input-event", (event, input) => { if (input.key === "F12") { event.preventDefault(); - editorWindow.webContents.toggleDevTools(); + this.mainWindow?.webContents.toggleDevTools(); } }); editorWindow.on("close", () => { - editorWindow.webContents.closeDevTools(); + this.mainWindow?.webContents.closeDevTools(); this.editorWindows.delete(themeId); }); }