Make WordPress Core

Ticket #40302: 40302.1.diff

File 40302.1.diff, 749 bytes (added by audrasjb, 3 years ago)

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

  • src/js/_enqueues/admin/user-profile.js

    diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js
    index c2a403fe38..f572963c73 100644
    a b  
    4343
    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                $( $pass1Text ).focus();
    4649        }
    4750
    4851        function bindPass1() {
  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index 0d030863ed..8045f03e52 100644
    a b switch ( $action ) { 
    935935                </p>
    936936                <?php
    937937
    938                 login_footer( 'user_pass' );
     938                login_footer( 'pass1-text' );
    939939                break;
    940940
    941941        case 'register':