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: workaround for hang when preventDefault-ing nativeWindowOpen (7-1-x) #21497
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.
seems legit
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.
also, could we get a test for this?
52b18a3
to
09b17c8
Compare
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.
Point of note, this is a deliberately undocumented temporary event that will be removed as soon as the real fix has landed. This is just a quick workaround to allow folks to adopt 7.1
and nativeWindowOpen
. We intend to ship a real and documented fix as 7.2
(it will be semver/minor).
has died, but will ✅ when green:) |
Release Notes Persisted
|
/trop run backport-to 8-x-y |
@loc is not authorized to run PR backports. |
/trop run backport-to 8-x-y |
The backport process for this PR has been manually initiated - |
/trop run backport-to 9-x-y |
The backport process for this PR has been manually initiated - |
I have automatically backported this PR to "8-x-y", please check out #22749 |
I have automatically backported this PR to "9-x-y", please check out #22750 |
Description of Change
Addresses the same issues as #21236, except without replacing the current API and cleaning up the involved code paths. Briefly, the issue is that canceling a
nativeWindowOpen
-ed window in thenew-window
event causes a hang because the WebContents is already initializing. This change adds a hook earlier, so we can cancel before it starts loading.#21236 is the "right way", this change is because we need the workaround sooner than time allows. We'd prefer not to rush the addition of a new API!
Checklist
npm test
passesRelease Notes
Notes: Added workaround for nativeWindowOpen hang.