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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testable? 🤔
1d4dd84
to
e4c386b
Compare
e4c386b
to
a89cf08
Compare
Release Notes Persisted
|
I was unable to backport this PR to "11-x-y" cleanly; |
I was unable to backport this PR to "10-x-y" cleanly; |
I have automatically backported this PR to "12-x-y", please check out #27187 |
@codebytere has manually backported this PR to "11-x-y", please check out #27219 |
@codebytere has manually backported this PR to "10-x-y", please check out #27220 |
Description of Change
Closes #26975.
Fixes an issue where a
BrowserView
couldn't be reparented properly (moved from oneBrowserWindow
to another) because it wasn't properly detached from the firstBrowserWindow
.A
BrowserWindow
has a one-to-many relationship withBrowserViews
, but aBrowserView
can only have a single owner window. As such, if aBrowserView
is added to aBrowserWindow
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
npm test
passesRelease Notes
Notes: Fixes an issue where BrowserViews couldn't be effectively reparented.