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: ensure BrowserView bounds are always relative to window #39605

Merged
merged 1 commit into from Aug 23, 2023

Conversation

codebytere
Copy link
Member

Description of Change

Closes #39257

Fixes an issue where BrowserViews that have their bounds set prior to being added to a BrowserWindow have unexpected incorrect offsets after being added. This was happening because BrowserView bounds are intended to be relative to the containing window, and were not updated relative to the window once they were added to one. We fix this by checking whether or not the BrowserView had its bounds previously set and ensure they're reset relative to the window on addition.

Checklist

Release Notes

Notes: Fixed an issue where BrowserViews that had their bounds set prior to being added to a BrowserWindow could have unexpected incorrect offsets.

@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Aug 22, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 22, 2023
@codebytere codebytere added target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. labels Aug 22, 2023
@codebytere codebytere force-pushed the coordinate-space-calculation-change branch from fd8cf86 to be77505 Compare August 22, 2023 08:12
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 23, 2023
@jkleinsc jkleinsc merged commit a8999bc into main Aug 23, 2023
17 checks passed
@jkleinsc jkleinsc deleted the coordinate-space-calculation-change branch August 23, 2023 13:55
@release-clerk
Copy link

release-clerk bot commented Aug 23, 2023

Release Notes Persisted

Fixed an issue where BrowserViews that had their bounds set prior to being added to a BrowserWindow could have unexpected incorrect offsets.

@trop
Copy link
Contributor

trop bot commented Aug 23, 2023

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

@trop
Copy link
Contributor

trop bot commented Aug 23, 2023

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

@trop trop bot added needs-manual-bp/25-x-y needs-manual-bp/26-x-y and removed target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. labels Aug 23, 2023
@trop
Copy link
Contributor

trop bot commented Aug 23, 2023

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

@trop trop bot added in-flight/27-x-y merged/27-x-y PR was merged to the "27-x-y" branch. and removed target/27-x-y PR should also be added to the "27-x-y" branch. in-flight/27-x-y labels Aug 23, 2023
@trop
Copy link
Contributor

trop bot commented Sep 13, 2023

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

@trop
Copy link
Contributor

trop bot commented Sep 13, 2023

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

@trop trop bot added in-flight/25-x-y merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. and removed needs-manual-bp/25-x-y in-flight/25-x-y in-flight/26-x-y labels Sep 13, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
…ron#39605)

fix: ensure BrowserView bounds are always relative to window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: BrowserView y-coordinate is not respected on macOS Ventura (13.4.1 and 13.5)
4 participants