fix(desktop): open external links in system browser instead of webview (#7360)

This commit is contained in:
Turcu Laurentiu
2026-01-15 09:12:27 +01:00
committed by GitHub
parent 1fb611ef0a
commit 779610d668
2 changed files with 10 additions and 1 deletions

View File

@@ -292,6 +292,15 @@ root?.addEventListener("mousewheel", (e) => {
e.stopPropagation()
})
// Handle external links - open in system browser instead of webview
document.addEventListener("click", (e) => {
const link = (e.target as HTMLElement).closest("a.external-link") as HTMLAnchorElement | null
if (link?.href) {
e.preventDefault()
platform.openLink(link.href)
}
})
render(() => {
const [serverPassword, setServerPassword] = createSignal<string | null>(null)
const platform = createPlatform(() => serverPassword())