Skip to content

Commit

Permalink
Merge pull request #34283 from gijoe0295/gijoe-33435
Browse files Browse the repository at this point in the history
Feature: Support trackpad swipe on Mac to navigate on desktop app
  • Loading branch information
amyevans authored Jan 11, 2024
2 parents d541723 + d0f0336 commit 7c2a1b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,15 @@ const mainWindow = () => {
}
});

browserWindow.on('swipe', (e, direction) => {
if (direction === 'right') {
browserWindow.webContents.goBack();
}
if (direction === 'left') {
browserWindow.webContents.goForward();
}
});

browserWindow.on(ELECTRON_EVENTS.FOCUS, () => {
browserWindow.webContents.send(ELECTRON_EVENTS.FOCUS);
});
Expand Down

0 comments on commit 7c2a1b3

Please sign in to comment.