diff --git a/src/main/menu.ts b/src/main/menu.ts index 34bd724d0a..92782cd3d0 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -188,14 +188,14 @@ export function buildMenu(windowManager: WindowManager) { label: "Back", accelerator: "CmdOrCtrl+[", click() { - webContents.getFocusedWebContents()?.goBack(); + webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => wc.goBack()); } }, { label: "Forward", accelerator: "CmdOrCtrl+]", click() { - webContents.getFocusedWebContents()?.goForward(); + webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => wc.goForward()); } }, { diff --git a/src/main/window-manager.ts b/src/main/window-manager.ts index 0822ed331a..b0014eac47 100644 --- a/src/main/window-manager.ts +++ b/src/main/window-manager.ts @@ -243,8 +243,10 @@ export class WindowManager extends Singleton { if (frameInfo) { this.sendToView({ channel: IpcRendererNavigationEvents.RELOAD_PAGE, frameInfo }); } else { - webContents.getFocusedWebContents()?.reload(); - webContents.getFocusedWebContents()?.clearHistory(); + webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => { + wc.reload(); + wc.clearHistory(); + }); } }