diff --git a/app-shell/src/ui.ts b/app-shell/src/ui.ts index c60118bc0cd..6734136fc6e 100644 --- a/app-shell/src/ui.ts +++ b/app-shell/src/ui.ts @@ -57,14 +57,10 @@ export function createUi(): BrowserWindow { mainWindow.loadURL(url, { extraHeaders: 'pragma: no-cache\n' }) // open new windows ( { - if (disposition === 'new-window' && url === 'about:blank') { - // eslint-disable-next-line no-void - void shell.openExternal(url) - return { action: 'deny' } - } else { - return { action: 'allow' } - } + mainWindow.webContents.setWindowOpenHandler(({ url }) => { + // eslint-disable-next-line no-void + void shell.openExternal(url) + return { action: 'deny' } }) return mainWindow