Skip to content

Build your personal knowledge base with Trilium Notes

electron: Fix alt+left, alt+right navigation

Elian Doran743fee27838c
diff --git a/src/public/app/components/entrypoints.js b/src/public/app/components/entrypoints.js
index 6b281911f0..6a375d5afc 100644
--- a/src/public/app/components/entrypoints.js
+++ b/src/public/app/components/entrypoints.js
@@ -102,7 +102,7 @@ export default class Entrypoints extends Component {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
- const activeIndex = parseInt(webContents.getActiveIndex());
+ const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
webContents.goToIndex(activeIndex - 1);
}
@@ -115,7 +115,7 @@ export default class Entrypoints extends Component {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
- const activeIndex = parseInt(webContents.getActiveIndex());
+ const activeIndex = parseInt(webContents.navigationHistory.getActiveIndex());
webContents.goToIndex(activeIndex + 1);
}