Ticket #33385: 33385.4.diff
File 33385.4.diff, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/user-profile.js
47 47 .addClass( $pass1[0].className ) 48 48 .data( 'pw', $pass1.data( 'pw' ) ) 49 49 .val( $pass1.val() ) 50 .on( ' input propertychange', function () {50 .on( 'keyup', function () { 51 51 if ( $pass1Text.val() === currentPass ) { 52 52 return; 53 53 } … … 62 62 generatePassword(); 63 63 } 64 64 65 $pass1.on( ' input propertychangepwupdate', function () {65 $pass1.on( 'keyup pwupdate', function () { 66 66 if ( $pass1.val() === currentPass ) { 67 67 return; 68 68 } 69 69 70 70 currentPass = $pass1.val(); 71 $pass1Text.val( currentPass ); 71 if ( $pass1Text.val() !== currentPass ) { 72 $pass1Text.val( currentPass ); 73 } 74 72 75 $pass1.add( $pass1Text ).removeClass( 'short bad good strong' ); 73 76 74 77 if ( passStrength.className ) { … … 163 166 * This fixes the issue by copying any changes from the hidden 164 167 * pass2 field to the pass1 field, then running check_pass_strength. 165 168 */ 166 $pass2 = $('#pass2').on( 'input propertychange', function () { 169 $pass2 = $('#pass2'); 170 $pass2.on( 'keyup', function () { 167 171 if ( $pass2.val().length > 0 ) { 168 172 $pass1.val( $pass2.val() ); 169 173 $pass2.val(''); … … 244 248 var $colorpicker, $stylesheet, user_id, current_user_id, 245 249 select = $( '#display_name' ); 246 250 247 $('#pass1').val('').on( ' input propertychangepwupdate', check_pass_strength );251 $('#pass1').val('').on( 'keyup pwupdate', check_pass_strength ); 248 252 $('#pass-strength-result').show(); 249 253 $('.color-palette').click( function() { 250 254 $(this).siblings('input[name="admin_color"]').prop('checked', true);