Merge pull request #169 from open-webui/main
Some checks are pending
Build and Release Electron App (electron-builder) / Compile (Typecheck + Vite Build) (push) Waiting to run
Build and Release Electron App (electron-builder) / Package (macos-latest-arm64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Package (ubuntu-24.04-arm-arm64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Package (windows-11-arm-arm64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Package (macos-latest-x64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Package (ubuntu-latest-x64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Package (windows-latest-x64) (push) Blocked by required conditions
Build and Release Electron App (electron-builder) / Create GitHub Release (push) Blocked by required conditions

0.0.16
This commit is contained in:
Tim Baek 2026-05-02 06:05:09 -04:00 committed by GitHub
commit c0e463b191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 2 deletions

View file

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.0.16] - 2026-05-02
### Fixed
- **Links Open in Default Browser.** Clicking links in chat responses now opens them in the user's default browser instead of navigating within the app or spawning a new Electron window (#165).
## [0.0.15] - 2026-04-28
### Added

View file

@ -1,6 +1,6 @@
{
"name": "open-webui",
"version": "0.0.15",
"version": "0.0.16",
"license": "AGPL-3.0",
"description": "Open WebUI Desktop",
"main": "./out/main/index.js",

View file

@ -1236,6 +1236,10 @@ if (!gotTheLock) {
// Log webview guest renderer crashes for diagnostics — the existing
// 'crashed' listener in Content.svelte surfaces these to the user.
//
// For webview guests we also intercept navigation and popup events
// so that external links open in the user's default browser instead
// of navigating the webview or spawning a new Electron window (#165).
app.on('web-contents-created', (_event, contents) => {
contents.on('render-process-gone', (_e, details) => {
if (details.reason !== 'clean-exit') {
@ -1245,6 +1249,30 @@ if (!gotTheLock) {
)
}
})
if (contents.getType() === 'webview') {
// ── Popups (target="_blank" links) → open in default browser ──
contents.setWindowOpenHandler(({ url }) => {
openUrl(url)
return { action: 'deny' }
})
// ── In-page navigation to a different origin → open externally ──
// This catches regular link clicks (no target) that would navigate
// the webview away from the Open WebUI instance.
contents.on('will-navigate', (event, url) => {
try {
const currentOrigin = new URL(contents.getURL()).origin
const targetOrigin = new URL(url).origin
if (targetOrigin !== currentOrigin) {
event.preventDefault()
openUrl(url)
}
} catch {
// Malformed URL — let it through so Chromium can handle/reject it
}
})
}
})
// ─── IPC Handlers ─────────────────────────────────

View file

@ -268,7 +268,6 @@
src={connUrl}
class="flex-1 min-h-0 border-none"
style="display: {view === 'connected' && activeConnectionId === connId ? 'flex' : 'none'}"
allowpopups
partition="persist:connection-{connId}"
preload={contentPreloadPath}
></webview>