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

fix: handle BrowserView reparenting #27000

Merged
merged 3 commits into from Jan 5, 2021
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Dec 14, 2020

Description of Change

Closes #26975.

Fixes an issue where a BrowserView couldn't be reparented properly (moved from one BrowserWindow to another) because it wasn't properly detached from the first BrowserWindow.

A BrowserWindow has a one-to-many relationship with BrowserViews, but a BrowserView can only have a single owner window. As such, if a BrowserView is added to a BrowserWindow which has an owner window which is both not null and not the current window in question, then it needs to be properly detached from the previous owner window.

Tested with https://gist.github.com/a786242649a5d2e462c3328c905f0c9f.

Checklist

Release Notes

Notes: Fixes an issue where BrowserViews couldn't be effectively reparented.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Dec 14, 2020
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Dec 14, 2020
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Testable? 🤔

@codebytere codebytere merged commit 3286b5f into master Jan 5, 2021
@release-clerk
Copy link

release-clerk bot commented Jan 5, 2021

Release Notes Persisted

Fixes an issue where BrowserViews couldn't be effectively reparented.

@codebytere codebytere deleted the bv-reparenting-handle branch January 5, 2021 00:34
@trop
Copy link
Contributor

trop bot commented Jan 5, 2021

I was unable to backport this PR to "11-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jan 5, 2021

I was unable to backport this PR to "10-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jan 5, 2021

I have automatically backported this PR to "12-x-y", please check out #27187

@trop
Copy link
Contributor

trop bot commented Jan 7, 2021

@codebytere has manually backported this PR to "11-x-y", please check out #27219

@trop
Copy link
Contributor

trop bot commented Jan 7, 2021

@codebytere has manually backported this PR to "10-x-y", please check out #27220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BrowserWindow.addBrowserView doesn't remove BrowserView from old owner window
4 participants