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

* fix: stop window.open from hanging when prevented

* add test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
trop[bot]
2021-06-28 15:23:49 +09:00
committed by GitHub
parent 755af34e1c
commit 5d6b8919b7
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({