Skip to content

Commit

Permalink
fix: editor window use correct dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Feb 16, 2025
1 parent b202daf commit 0511cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/services/window-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,18 @@ export class WindowManager {

editorWindow.once("ready-to-show", () => {
editorWindow.show();
WindowManager.mainWindow?.webContents.openDevTools();
editorWindow.webContents.openDevTools();
});

editorWindow.webContents.on("before-input-event", (event, input) => {
if (input.key === "F12") {
event.preventDefault();
this.mainWindow?.webContents.toggleDevTools();
editorWindow.webContents.toggleDevTools();
}
});

editorWindow.on("close", () => {
WindowManager.mainWindow?.webContents.closeDevTools();
editorWindow.webContents.closeDevTools();
this.editorWindows.delete(themeId);
});
}
Expand Down

0 comments on commit 0511cc0

Please sign in to comment.