WordPress.org

Make WordPress Core

Changeset 34114


Ignore:
Timestamp:
09/14/2015 10:38:32 AM (5 years ago)
Author:
ocean90
Message:

Passwords: Trigger a wp-check-valid-field event when the password field is filled with a password by generatePassword().

Updates event handler in wpAjax.invalidateForm() to support wp-check-valid-field.

See #33406.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r34062 r34114  
    3333        } else {
    3434            $pass1.val( $pass1.data( 'pw' ) );
    35             $pass1.trigger( 'pwupdate' );
     35            $pass1.trigger( 'pwupdate' ).trigger( 'wp-check-valid-field' );
    3636            if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) {
    3737                $pass1Wrap.addClass( 'show-password' );
  • trunk/src/wp-includes/js/wp-ajax-response.js

    r34068 r34114  
    5151    },
    5252    invalidateForm: function ( selector ) {
    53         return jQuery( selector ).addClass( 'form-invalid' ).find('input').one( 'change', function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } );
     53        return jQuery( selector ).addClass( 'form-invalid' ).find('input').one( 'change wp-check-valid-field', function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } );
    5454    },
    5555    validateForm: function( selector ) {
Note: See TracChangeset for help on using the changeset viewer.