Make WordPress Core

Ticket #32886: no-timeout.diff

File no-timeout.diff, 1.3 KB (added by markjaquith, 10 years ago)
  • src/wp-admin/js/user-profile.js

    diff --git src/wp-admin/js/user-profile.js src/wp-admin/js/user-profile.js
    index e744814..314a271 100644
     
    5050                }
    5151
    5252                $pass1.on( 'input propertychange', function () {
    53                         setTimeout( function () {
    54                                 $pass1Text.val( $pass1.val() );
    55                                 $pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
    56 
    57                                 if ( passStrength.className ) {
    58                                         $pass1.add( $pass1Text ).addClass( passStrength.className );
    59                                         if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
    60                                                 if ( ! $weakCheckbox.prop( 'checked' ) ) {
    61                                                         $submitButtons.prop( 'disabled', true );
    62                                                 }
    63                                                 $weakRow.show();
    64                                         } else {
    65                                                 $submitButtons.prop( 'disabled', false );
    66                                                 $weakRow.hide();
     53                        $pass1Text.val( $pass1.val() );
     54                        $pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
     55
     56                        if ( passStrength.className ) {
     57                                $pass1.add( $pass1Text ).addClass( passStrength.className );
     58                                if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
     59                                        if ( ! $weakCheckbox.prop( 'checked' ) ) {
     60                                                $submitButtons.prop( 'disabled', true );
    6761                                        }
     62                                        $weakRow.show();
     63                                } else {
     64                                        $submitButtons.prop( 'disabled', false );
     65                                        $weakRow.hide();
    6866                                }
    69                         }, 1 );
     67                        }
    7068                } );
    7169        }
    7270