fix: stop window.open from hanging when prevented (#29851)

This commit is contained in:
Jeremy Rose 2021-06-24 08:50:48 -07:00 committed by GitHub
parent 9de8e676dd
commit 0f16575eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -76,6 +76,7 @@ ipcMainInternal.on(
const referrer: Electron.Referrer = { url: '', policy: 'strict-origin-when-cross-origin' };
const browserWindowOptions = event.sender._callWindowOpenHandler(event, { url, frameName, features, disposition: 'new-window', referrer });
if (event.defaultPrevented) {
event.returnValue = null;
return;
}
const guest = openGuestWindow({