Skip to content

fix(chromium): do not steal OS focus when creating pages - #41430

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-41306
Jun 23, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-41306

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • Pass background: false, focus: false to Target.createTarget so creating a page no longer activates the headed Chromium window and steals OS focus from the user.

Fixes #41306

Pass background: false, focus: false to Target.createTarget so that
creating a page opens the tab without activating the browser window.

Fixes: microsoft#41306
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit 8304ec9 into microsoft:main Jun 23, 2026
44 of 46 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7380 passed, 1122 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [chromium-library] › library/browsercontext-add-init-script.spec.ts:28 › should work without navigation, after all bindings @chromium-ubuntu-22.04-arm-node20
❌ [chromium-library] › library/browsercontext-expose-function.spec.ts:77 › should be callable from-inside addInitScript @chromium-ubuntu-22.04-arm-node20

4 flaky ⚠️ [chromium-library] › library/chromium/chromium.spec.ts:211 › should intercept service worker requests (main and within) `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/heap.spec.ts:223 › should not leak workers `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-ubuntu-22.04-node20`

49006 passed, 1142 skipped


Merge workflow run.

@Andrew-Chen-Wang

Copy link
Copy Markdown

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Allow Chrome to launch in the background during headful mode

3 participants