fix(app): go back and forward with the mouse buttons on desktop (#65129)

This commit is contained in:
Filip Hejmowski
2026-11-20 11:01:56 +01:00
committed by GitHub
Unverified
parent f0df6070f9
commit 13efefcfd3
@@ -201,6 +201,17 @@ export function Titlebar(props: { verticalTabs?: { mount?: HTMLElement } }) {
},
])
// The desktop router keeps its history in memory, so the mouse's Back and Forward buttons do nothing on their own.
// The web app's browser already traverses its real history for them.
if (platform.platform === "desktop")
makeEventListener(window, "mouseup", (event) => {
if (event.button !== 3 && event.button !== 4) return
event.preventDefault()
if (event.button === 3) return history.back()
history.forward()
})
return (
<header
data-slot="titlebar-v2"