Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add win.setTopBrowserView() so that BrowserViews can be raised #27713

Merged
merged 1 commit into from Feb 18, 2021

Conversation

sentialx
Copy link
Contributor

Description of Change

Backport of #27007

Release Notes

Notes: Added win.setTopBrowserView() so that BrowserViews can be raised.

electron#27007)

* feat: Raise a browser view via `BrowserWindow.setTopBrowserView()`.

This is similar to removing and re-adding a browser view, but avoids a visible flicker as the browser view is not removed from the window when using `setTopBrowserView`. Note: if the given browser view is not attached to the window, it will be added.

This commit contains the macOS implementation.

* feat: setTopBrowserView support for Windows and Linux

* docs: add info about setTopBrowserView

* docs: Clarify behavior when browserView is not yet attached.

* fix: throw en error when browserView is not attached to the window

* fix: build error

* fix: test

* fix: add test case

* fix: tests

* fix: reparenting

* fix: close second window in tests

Co-authored-by: sentialx <sentialx@gmail.com>
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 11, 2021
@trop trop bot added 12-x-y backport This is a backport PR backport/requested 🗳 semver/minor backwards-compatible functionality labels Feb 11, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 11, 2021
Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on behalf of @electron/wg-releases

@zcbenz zcbenz merged commit 5737849 into electron:12-x-y Feb 18, 2021
@release-clerk
Copy link

release-clerk bot commented Feb 18, 2021

Release Notes Persisted

Added win.setTopBrowserView() so that BrowserViews can be raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12-x-y backport/approved ✅ backport This is a backport PR semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants