Don't act busy on the login page for moving your cursor

If you were in the username field and simply tabbed out without entering anything, the form would become "busy" and not let you submit. We should only be doing this if we have work to do, like .well-known discovery of the homeserver.
This commit is contained in:
Travis Ralston 2019-05-20 20:00:11 -06:00
parent 3476be3327
commit 595b490fd7

View file

@ -236,12 +236,13 @@ module.exports = React.createClass({
}, },
onUsernameBlur: async function(username) { onUsernameBlur: async function(username) {
const doWellknownLookup = username[0] === "@";
this.setState({ this.setState({
username: username, username: username,
busy: true, // unset later by the result of onServerConfigChange busy: doWellknownLookup, // unset later by the result of onServerConfigChange
errorText: null, errorText: null,
}); });
if (username[0] === "@") { if (doWellknownLookup) {
const serverName = username.split(':').slice(1).join(':'); const serverName = username.split(':').slice(1).join(':');
try { try {
const result = await AutoDiscoveryUtils.validateServerName(serverName); const result = await AutoDiscoveryUtils.validateServerName(serverName);