mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #7131 from electron/end-sheet-on-close
End sheet in parent when closing modal window
This commit is contained in:
@@ -619,6 +619,7 @@ NativeWindowMac::~NativeWindowMac() {
|
||||
void NativeWindowMac::Close() {
|
||||
// When this is a sheet showing, performClose won't work.
|
||||
if (is_modal() && parent() && IsVisible()) {
|
||||
[parent()->GetNativeWindow() endSheet:window_];
|
||||
CloseImmediately();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user