diff --git a/package.json b/package.json index b20ac4b4..75d0ee83 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mattermost", "productName": "Mattermost", - "version": "3.4.0", + "version": "3.4.1", "description": "Mattermost Desktop application for Windows, Mac and Linux", "main": "main.js", "author": { diff --git a/src/browser/index.jsx b/src/browser/index.jsx index 11f45396..b12f9437 100644 --- a/src/browser/index.jsx +++ b/src/browser/index.jsx @@ -113,8 +113,10 @@ var MainPage = React.createClass({ } }); }, - componentDidUpdate: function() { - this.refs[`mattermostView${this.state.key}`].focusOnWebView(); + componentDidUpdate: function(prevProps, prevState) { + if (prevState.key !== this.state.key) { // i.e. When tab has been changed + this.refs[`mattermostView${this.state.key}`].focusOnWebView(); + } }, handleSelect: function(key) { const newKey = (this.props.teams.length + key) % this.props.teams.length; diff --git a/src/package.json b/src/package.json index 1b478274..cabec1fb 100644 --- a/src/package.json +++ b/src/package.json @@ -2,7 +2,7 @@ "name": "mattermost", "productName": "Mattermost", "desktopName": "Mattermost.desktop", - "version": "3.4.0", + "version": "3.4.1", "description": "Mattermost Desktop application for Windows, Mac and Linux", "main": "main.js", "author": {