Fix freeze effect after typing a wrong password in login/register

pull/1/head
yflory 5 years ago
parent bd163e65f3
commit 035707bd38

@ -3,7 +3,6 @@
define([], function () { define([], function () {
var loadingStyle = (function(){/* var loadingStyle = (function(){/*
#cp-loading { #cp-loading {
transition: opacity 0.75s, visibility 0s 0.75s;
visibility: visible; visibility: visible;
position: fixed; position: fixed;
z-index: 10000000; z-index: 10000000;
@ -24,6 +23,7 @@ define([], function () {
#cp-loading.cp-loading-hidden { #cp-loading.cp-loading-hidden {
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
transition: opacity 0.75s, visibility 0s 0.75s;
} }
#cp-loading .cp-loading-logo { #cp-loading .cp-loading-logo {
height: 300px; height: 300px;

@ -458,6 +458,7 @@ define([
UI.removeLoadingScreen(function () { UI.removeLoadingScreen(function () {
UI.alert(Messages.login_noSuchUser, function () { UI.alert(Messages.login_noSuchUser, function () {
hashing = false; hashing = false;
$('#password').focus();
}); });
}); });
break; break;
@ -465,6 +466,7 @@ define([
UI.removeLoadingScreen(function () { UI.removeLoadingScreen(function () {
UI.alert(Messages.login_invalUser, function () { UI.alert(Messages.login_invalUser, function () {
hashing = false; hashing = false;
$('#password').focus();
}); });
}); });
break; break;
@ -472,6 +474,7 @@ define([
UI.removeLoadingScreen(function () { UI.removeLoadingScreen(function () {
UI.alert(Messages.login_invalPass, function () { UI.alert(Messages.login_invalPass, function () {
hashing = false; hashing = false;
$('#password').focus();
}); });
}); });
break; break;
@ -482,6 +485,7 @@ define([
]); ]);
UI.alert(warning, function () { UI.alert(warning, function () {
hashing = false; hashing = false;
$('#password').focus();
}); });
}); });
break; break;

@ -484,7 +484,7 @@ define([
stopListening(listener); stopListening(listener);
cb(); cb();
}); });
listener = listenForKeys(close, close); listener = listenForKeys(close, close, frame);
var $ok = $(ok).click(close); var $ok = $(ok).click(close);
document.body.appendChild(frame); document.body.appendChild(frame);

@ -48,7 +48,7 @@ define([
var $passwd = $('#password') var $passwd = $('#password')
// background loading of login assets // background loading of login assets
// enter key while on password field clicks signup // enter key while on password field clicks signup
.on('keyup', function (e) { .on('keydown', function (e) {
if (e.which !== 13) { return; } // enter if (e.which !== 13) { return; } // enter
$('button.login').click(); $('button.login').click();
}); });

Loading…
Cancel
Save