mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 01:35:49 +03:00
electron support for mouse forward/back buttons in Windows
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
55084d3aca
commit
a6d5158830
1 changed files with 11 additions and 0 deletions
|
@ -228,6 +228,17 @@ electron.app.on('ready', () => {
|
|||
}
|
||||
});
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
// Handle forward/backward mouse buttons in Windows
|
||||
mainWindow.on('app-command', (e, cmd) => {
|
||||
if (cmd === 'browser-backward' && mainWindow.webContents.canGoBack()) {
|
||||
mainWindow.webContents.goBack();
|
||||
} else if (cmd === 'browser-forward' && mainWindow.webContents.canGoForward()) {
|
||||
mainWindow.webContents.goForward();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
webContentsHandler(mainWindow.webContents);
|
||||
mainWindowState.manage(mainWindow);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue