Make WordPress Core

Ticket #33699: 33699.4.diff

File 33699.4.diff, 768 bytes (added by adamsilverstein, 9 years ago)
  • src/wp-admin/js/user-profile.js

     
    195195                        }
    196196                } );
    197197
    198                 // Disable the hidden inputs to prevent autofill and submission.
    199                 $pass1.prop( 'disabled', true );
    200                 $pass2.prop( 'disabled', true );
    201                 $pass1Text.prop( 'disabled', true );
     198                // Disable hidden inputs to prevent autofill and submission.
     199                if ( ! $pass1.is( ':visible' ) ) {
     200                        $pass1.prop( 'disabled', true );
     201                        $pass2.prop( 'disabled', true );
     202                        $pass1Text.prop( 'disabled', true );
     203                }
    202204
    203205                $passwordWrapper = $pass1Row.find( '.wp-pwd' );
    204206                $generateButton  = $pass1Row.find( 'button.wp-generate-pw' );