mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
🐛 handle proxy auth window closing
This commit is contained in:
@@ -77,8 +77,13 @@ export class ProxyAuthHandler {
|
||||
const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')';
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
const onWindowClose = () => cb('', '');
|
||||
win.on('close', onWindowClose);
|
||||
|
||||
win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => {
|
||||
cb(username, password);
|
||||
win.removeListener('close', onWindowClose);
|
||||
win.close();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user