mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make back/forward/refresh work the same as the arrow button in topbar (#3720)
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
2 files changed
+6
-4
No files matched your search
+2
-2
@@ -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());
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user