Merge pull request #7131 from electron/end-sheet-on-close
End sheet in parent when closing modal window
This commit is contained in:
commit
2885e980a5
1 changed files with 1 additions and 0 deletions
|
@ -619,6 +619,7 @@ NativeWindowMac::~NativeWindowMac() {
|
||||||
void NativeWindowMac::Close() {
|
void NativeWindowMac::Close() {
|
||||||
// When this is a sheet showing, performClose won't work.
|
// When this is a sheet showing, performClose won't work.
|
||||||
if (is_modal() && parent() && IsVisible()) {
|
if (is_modal() && parent() && IsVisible()) {
|
||||||
|
[parent()->GetNativeWindow() endSheet:window_];
|
||||||
CloseImmediately();
|
CloseImmediately();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue