Login and Registration: auto-focus the reset password field.

Although auto-focusing form fields can be arguable in some cases, it makes sense when there is a very specific task to accomplish and when there is no relevant content before the auto-focused field.

This change brings consistency between various forms generated by `wp-login.php`.

Props afercia, donmhico, sabernhardt.
Fixes #40302.

Built from https://develop.svn.wordpress.org/trunk@52193


git-svn-id: http://core.svn.wordpress.org/trunk@51785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2021-11-17 00:14:01 +00:00
parent 8a5e1aa0b3
commit 0a8b1555b8
4 changed files with 6 additions and 3 deletions

View File

@ -43,6 +43,9 @@
// Once zxcvbn loads, passwords strength is known.
$( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
// Focus the password field.
$( $pass1 ).trigger( 'focus' );
}
function bindPass1() {

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-52192';
$wp_version = '5.9-alpha-52193';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -992,7 +992,7 @@ switch ( $action ) {
</p>
<?php
login_footer( 'user_pass' );
login_footer( 'pass1' );
break;
case 'register':