fix(desktop): preserve keyboard focus during browser navigation (#48593)

This commit is contained in:
Luke Parker
2026-09-12 03:54:22 +00:00
committed by GitHub
parent b2e6e764a8
commit 60fb97d59e
@@ -53,6 +53,8 @@ export function createBrowserPage(
webviewTag: false,
devTools: false,
backgroundThrottling: false,
// Agent navigation, including in hidden tabs, must not take the user's keyboard focus.
focusOnNavigation: false,
},
})
const contents = view.webContents
@@ -157,6 +159,8 @@ export function createBrowserPage(
webSecurity: true,
webviewTag: false,
devTools: false,
// Electron applies these preferences before the popup is adopted by our view.
focusOnNavigation: false,
partition: options.partition,
},
},