From bc07c8bbde7c99b22bc7277538416070c865dbb6 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 7 Aug 2020 13:32:41 +0300 Subject: [PATCH] fix menu navigation Signed-off-by: Roman --- src/main/menu.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/menu.ts b/src/main/menu.ts index 67daf37fc2..5a6f86160d 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -79,21 +79,21 @@ export function buildMenu(windowManager: WindowManager) { label: 'Back', accelerator: 'CmdOrCtrl+[', click() { - webContents.getFocusedWebContents().executeJavaScript('window.history.back()') + webContents.getFocusedWebContents()?.goBack(); } }, { label: 'Forward', accelerator: 'CmdOrCtrl+]', click() { - webContents.getFocusedWebContents().executeJavaScript('window.history.forward()') + webContents.getFocusedWebContents()?.goForward(); } }, { label: 'Reload', accelerator: 'CmdOrCtrl+R', click() { - webContents.getFocusedWebContents().reload() + webContents.getFocusedWebContents()?.reload(); } }, { role: 'toggleDevTools' },