diff --git a/src/app/child-window-handler.ts b/src/app/child-window-handler.ts index 3b89c2886..9f39b94bd 100644 --- a/src/app/child-window-handler.ts +++ b/src/app/child-window-handler.ts @@ -193,13 +193,13 @@ export const handleChildWindow = (webContents: WebContents): void => { } }); } else { + event.preventDefault(); if (newWinUrl && newWinUrl.length > 2083) { logger.info(`child-window-handler: new window url length is greater than 2083, not performing any action!`); return; } logger.info(`child-window-handler: new window url is ${newWinUrl} which is not of the same host, so opening it in the default browser!`); - event.preventDefault(); windowHandler.openUrlInDefaultBrowser(newWinUrl); } };