This is a backport PR for branch 45-x-y
codebytere

#54454: fix: keep focus in a child WebContentsView when its window regains focus

Open
Created: Sep 26, 2026, 7:44:45 AM
0 comments
Target: 45-x-y

Backport of #54378

See that PR for details. BrowserWindow::OnWindowFocus() on 45-x-y still uses the api_web_contents_ weak pointer rather than main's GetLiveWebContents(), so the cherry-pick conflicted there; the same FocusIsInAnotherView() guard is applied to the 45-x-y shape.

Notes: Fixed a child WebContentsView losing focus when its window is reactivated.

Backport Information

Original PR Author
codebytere
Original PR Status
Merged
Original PR Merged At
Sep 26, 2026, 7:43:26 AM
Original PR Link
GitHubView on GitHub

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron