Skip to content

fix: propagate window.open settings to child window#31031

Merged
VerteDinde merged 1 commit intomainfrom
fix-child-transparency-main
Sep 21, 2021
Merged

fix: propagate window.open settings to child window#31031
VerteDinde merged 1 commit intomainfrom
fix-child-transparency-main

Conversation

@VerteDinde
Copy link
Copy Markdown
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 recently 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
Copy Markdown

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
Copy Markdown
Contributor

trop bot commented Sep 21, 2021

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

@trop
Copy link
Copy Markdown
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.

2 participants