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: propagate window.open settings to child window #31031

Merged
merged 1 commit into from Sep 21, 2021

Conversation

VerteDinde
Copy link
Member

@VerteDinde VerteDinde commented Sep 20, 2021

Description of Change

In #24517 and #28518, as part of adding the new setWindowOpenHandler API, we refactored the _callWindowOpenHandler method to pass in additional details and make it more compatible with the new API standard, setWindowOpenHandler. However, this also broke how feature details were passed into new child/guest windows, specifically ones still using window.open - if a window was not opened with an existing windowHandler, all child window constructor options would automatically return null, hitting this check.

In Electron 14 and 15, two things changed: 1) child windows no longer inherit their transparency settings from parent windows, and 2) our previous default if no background color exists, SKColor_TRANSPARENT was converted to an optional value absl::nullopt, which defaults to white. Thus, this bug suddenly surfaced for child windows opened with window.open.

This PR allows child windows to fall back on the parsed features to correctly read transparency, background color, etc, until the window.open event is removed.

Checklist

Release Notes

Notes: Fixed child windows not inheriting the correct transparency and background color settings.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Sep 20, 2021
@VerteDinde VerteDinde added target/14-x-y semver/patch backwards-compatible bug fixes labels Sep 21, 2021
@VerteDinde VerteDinde merged commit 4fcc088 into main Sep 21, 2021
@VerteDinde VerteDinde deleted the fix-child-transparency-main branch September 21, 2021 16:06
@release-clerk
Copy link

release-clerk bot commented Sep 21, 2021

Release Notes Persisted

Fixed child windows not inheriting the correct transparency and background color settings.

@trop
Copy link
Contributor

trop bot commented Sep 21, 2021

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

@trop
Copy link
Contributor

trop bot commented Sep 21, 2021

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

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.

None yet

2 participants