From 595b490fd7130c0a53e61902723627358e60ce58 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 20 May 2019 20:00:11 -0600 Subject: [PATCH] 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. --- src/components/structures/auth/Login.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 393c640604..aed8e9fca0 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -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);