From 0edc3d01e20bf66ecf80d3ad751b74f3c3c4b1d7 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Tue, 2 Jan 2018 17:00:12 +0530 Subject: [PATCH] electron-258: fixes the pop out issue for meetings and supports undefined urls in case of new window events as per the html dom specs --- js/windowMgr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/windowMgr.js b/js/windowMgr.js index ff1e144a..8f65c209 100644 --- a/js/windowMgr.js +++ b/js/windowMgr.js @@ -311,7 +311,7 @@ function doCreateMainWindow(initialUrl, initialBounds) { // open external links in default browser - a tag with href='_blank' or window.open mainWindow.webContents.on('new-window', function (event, newWinUrl, frameName, disposition, newWinOptions) { - + let newWinParsedUrl = getParsedUrl(newWinUrl); let mainWinParsedUrl = getParsedUrl(url); @@ -320,7 +320,7 @@ function doCreateMainWindow(initialUrl, initialBounds) { // only allow window.open to succeed is if coming from same hsot, // otherwise open in default browser. - if (disposition === 'new-window' && newWinHost === mainWinHost) { + if (disposition === 'new-window' && ((newWinHost === mainWinHost) || newWinUrl === 'about:blank')) { // handle: window.open if (!frameName) {