Merge pull request #7131 from electron/end-sheet-on-close

End sheet in parent when closing modal window
This commit is contained in:
Cheng Zhao 2016-09-08 15:53:07 +09:00 committed by GitHub
commit 2885e980a5

View file

@ -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;
}