From a074126537ff88d303849e5487260aeb6969cb54 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Tue, 19 Mar 2019 18:00:52 +0530 Subject: [PATCH] ELECTRON-1138: support opening email composition in new window (#602) * bump up version number * ELECTRON-1138: support opening email composition in new window Currently, due to security reasons, we don't open any url which is not the same as the main window url in a new window, instead, we open it in a new tab of the system default browser. However, this impacts the email app as we'll need new window to be opened to compose an email. This commit fixes that issue by checking if we need to open a sub-domain of the pod url domain. --- js/windowMgr.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/windowMgr.js b/js/windowMgr.js index dd78dcc9..59d71970 100644 --- a/js/windowMgr.js +++ b/js/windowMgr.js @@ -466,7 +466,7 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) { // only allow window.open to succeed is if coming from same host, // otherwise open in default browser. - if ((newWinHost === mainWinHost || newWinUrl === emptyUrlString) && dispositionWhitelist.includes(disposition)) { + if ((newWinHost === mainWinHost || newWinUrl === emptyUrlString || (newWinHost.indexOf(mainWinHost) !== -1 && frameName !== "")) && dispositionWhitelist.includes(disposition)) { // handle: window.open if (!frameName) { diff --git a/package.json b/package.json index acd7a6d3..21d74d37 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Symphony", "productName": "Symphony", - "version": "4.4.2", + "version": "4.5.0", "clientVersion": "1.54", "buildNumber": "0", "description": "Symphony desktop app (Foundation ODP)",