1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-31 10:54:46 +03:00

Improved autofocus of login form fields

This commit is contained in:
Rouslan Placella
2012-11-05 18:32:14 +00:00
parent 08b74f5f74
commit d02587a261

View File

@@ -3785,10 +3785,17 @@ AJAX.registerOnload('functions.js', function () {
$("a._blank").prop("target", "_blank");
/**
* Reveal the login form to users with JS enabled
* and focus the appropriate input field
*/
var $loginform = $('#loginform');
$loginform.find('.js-show').show();
$loginform.find('#input_username').select();
if ($loginform.length) {
$loginform.find('.js-show').show();
if ($('#input_username').val()) {
$('#input_password').focus();
} else {
$('#input_username').focus();
}
}
});
/**