diff --git a/src/skins/vector/views/templates/Login.js b/src/skins/vector/views/templates/Login.js index e01bd1f7..8bd9334e 100644 --- a/src/skins/vector/views/templates/Login.js +++ b/src/skins/vector/views/templates/Login.js @@ -17,6 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); +var ReactDOM = require('react-dom'); var sdk = require('matrix-react-sdk') var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); @@ -44,6 +45,17 @@ module.exports = React.createClass({ customIsUrl: is_url || config.default_is_url, serverConfigVisible: (hs_url && hs_url !== config.default_hs_url || is_url && is_url !== config.default_is_url) + }; + }, + + componentDidMount: function() { + this.onHSChosen(); + }, + + componentDidUpdate: function() { + if (!this.state.focusFired && this.refs.user) { + this.refs.user.focus(); + this.setState({ focusFired: true }); } }, @@ -146,7 +158,7 @@ module.exports = React.createClass({ return (
-
+

{ this.componentForStep('choose_hs') }