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: crash on BrowserWindow.setEnabled()
#34904
Conversation
@@ -484,7 +484,8 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { | |||
// [window_ performClose:nil], the window won't close properly | |||
// even after the user has ended the sheet. | |||
// Ensure it's closed before calling [window_ performClose:nil]. | |||
SetEnabled(true); | |||
if ([window_ attachedSheet]) |
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.
this is changed to make more explicit exactly what is happening.
08ebc2b
to
b58f6eb
Compare
Release Notes Persisted
|
I have automatically backported this PR to "19-x-y", please check out #34971 |
I have automatically backported this PR to "20-x-y", please check out #34972 |
I have automatically backported this PR to "18-x-y", please check out #34973 |
fix: crash on BrowserWindow.setEnabled()
fix: crash on BrowserWindow.setEnabled()
Description of Change
Fixes #34707.
Fixes an issue where calling
BrowserWindow.setEnabled(false)
would crash. This was happening because we were attempting to create a sheet modal on the window with itself. Fix this by instead creating a dummy sheet window to disable interaction with the main window.Checklist
npm test
passesRelease Notes
Notes: Fixed a crash when calling
BrowserWindow.setEnabled()
.