diff --git a/app/package.json b/app/package.json index b5fe0541b..dd4eecf25 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "mailspring", "productName": "Mailspring", - "version": "1.5.3", + "version": "1.5.4", "commitHash": "COMMIT_INSERTED_DURING_PACKAGING", "description": "The best email app for people and teams at work", "license": "GPL-3.0", diff --git a/app/src/components/webview.jsx b/app/src/components/webview.jsx index 25ec05fc5..21adc5346 100644 --- a/app/src/components/webview.jsx +++ b/app/src/components/webview.jsx @@ -109,6 +109,7 @@ export default class Webview extends React.Component { 'did-finish-load': this._webviewDidFinishLoad, 'did-get-response-details': this._webviewDidGetResponseDetails, 'console-message': this._onConsoleMessage, + 'new-window': this._onNewWindow, }; for (const event of Object.keys(listeners)) { webview.removeEventListener(event, listeners[event]); @@ -125,6 +126,13 @@ export default class Webview extends React.Component { webview.reload(); }; + _onNewWindow = e => { + const { protocol } = url.parse(e.url); + if (protocol === 'http:' || protocol === 'https:') { + shell.openExternal(e.url); + } + }; + _onConsoleMessage = e => { if (/^http.+/i.test(e.message)) { shell.openExternal(e.message); diff --git a/package.json b/package.json index b17663753..2c1c7d2cd 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "babel-preset-react": "6.x.x", "chalk": "1.x.x", "devtron": "^1.4.0", - "electron": "4.0.0-beta.11", + "electron": "4.0.0", "electron-installer-dmg": "0.2.x", "electron-packager": "13.0.x", "electron-winstaller": "2.x.x",