From 4f104c93c5bf4a49de4b01cf9996b3adc5e144ff Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Wed, 1 Apr 2020 14:08:00 -0400 Subject: [PATCH] [MM-23153] Fixed the issue where back/forward navigation not in the main window causes the app to crash (#1248) * [MM-23153] Force the back/forward buttons to only work with the main window * Revert "[MM-23153] Force the back/forward buttons to only work with the main window" This reverts commit 9db159dbb9c6b08887492f44f5d1a7bd0df55517. * Just fix the bug --- src/main/menus/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/menus/app.js b/src/main/menus/app.js index 57807a70..47a11bfd 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -214,7 +214,7 @@ function createTemplate(mainWindow, config, isDev) { if (focusedWindow === mainWindow) { mainWindow.webContents.send('go-back'); } else if (focusedWindow.webContents.canGoBack()) { - focusedWindow.goBack(); + focusedWindow.webContents.goBack(); } }, }, { @@ -224,7 +224,7 @@ function createTemplate(mainWindow, config, isDev) { if (focusedWindow === mainWindow) { mainWindow.webContents.send('go-forward'); } else if (focusedWindow.webContents.canGoForward()) { - focusedWindow.goForward(); + focusedWindow.webContents.goForward(); } }, }],