Make WordPress Core

Ticket #33385: 33385.1.diff

File 33385.1.diff, 1.5 KB (added by peterwilsoncc, 9 years ago)
  • src/wp-admin/js/user-profile.js

    diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js
    index bb80a32..ab4b3e8 100644
    a b  
    4747                        .addClass( $pass1[0].className )
    4848                        .data( 'pw', $pass1.data( 'pw' ) )
    4949                        .val( $pass1.val() )
    50                         .on( 'input propertychange', function () {
     50                        .on( 'keypress', function () {
    5151                                if ( $pass1Text.val() === currentPass ) {
    5252                                        return;
    5353                                }
     
    6262                        generatePassword();
    6363                }
    6464
    65                 $pass1.on( 'input propertychange pwupdate', function () {
     65                $pass1.on( 'keypress pwupdate', function () {
    6666                        if ( $pass1.val() === currentPass ) {
    6767                                return;
    6868                        }
     
    163163                 * This fixes the issue by copying any changes from the hidden
    164164                 * pass2 field to the pass1 field, then running check_pass_strength.
    165165                 */
    166                 $pass2 = $('#pass2').on( 'input propertychange', function () {
     166                $pass2 = $('#pass2');
     167                $pass2.on( 'keypress', function () {
    167168                        if ( $pass2.val().length > 0 ) {
    168169                                $pass1.val( $pass2.val() );
    169170                                $pass2.val('');
     
    244245                var $colorpicker, $stylesheet, user_id, current_user_id,
    245246                        select = $( '#display_name' );
    246247
    247                 $('#pass1').val('').on( 'input propertychange pwupdate', check_pass_strength );
     248                $('#pass1').val('').on( 'keypress pwupdate', check_pass_strength );
    248249                $('#pass-strength-result').show();
    249250                $('.color-palette').click( function() {
    250251                        $(this).siblings('input[name="admin_color"]').prop('checked', true);