[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
This commit is contained in:
parent
3d188030a4
commit
4f104c93c5
|
@ -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();
|
||||
}
|
||||
},
|
||||
}],
|
||||
|
|
Loading…
Reference in a new issue