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.
pull/21833/head
Travis Ralston 2019-05-20 20:00:11 -06:00
parent 3476be3327
commit 595b490fd7
1 changed files with 3 additions and 2 deletions

View File

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