browser(webkit): do not hang on close when there is a dialog (#4332)

This commit is contained in:
Yury Semikhatsky 2020-11-03 18:58:57 -08:00 committed by GitHub
parent bc9765072f
commit 890add98fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,2 @@
1377
Changed: yurys@chromium.org Tue 03 Nov 2020 03:59:48 PM PST
1378
Changed: yurys@chromium.org Tue Nov 3 18:28:54 PST 2020

View File

@ -358,6 +358,7 @@ const NSActivityOptions ActivityOptions =
#pragma mark WKUIDelegate
- (void)webViewDidClose:(WKWebView *)webView {
[self webView:webView handleJavaScriptDialog:false value:nil];
for (NSWindow *window in _headlessWindows) {
if (webView.window != window)
continue;

View File

@ -418,6 +418,7 @@ static BOOL areEssentiallyEqual(double a, double b)
}
- (void)webViewDidClose:(WKWebView *)webView {
[self webView:webView handleJavaScriptDialog:false value:nil];
[self.window close];
}