mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
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:
parent
3476be3327
commit
595b490fd7
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue