Make WordPress Core

Changeset 52193


Ignore:
Timestamp:
11/17/2021 12:12:35 AM (3 years ago)
Author:
audrasjb
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/user-profile.js

    r51526 r52193  
    4444        // Once zxcvbn loads, passwords strength is known.
    4545        $( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
     46
     47        // Focus the password field.
     48        $( $pass1 ).trigger( 'focus' );
    4649    }
    4750
  • trunk/src/wp-login.php

    r52091 r52193  
    993993        <?php
    994994
    995         login_footer( 'user_pass' );
     995        login_footer( 'pass1' );
    996996        break;
    997997
Note: See TracChangeset for help on using the changeset viewer.