diff --git src/wp-admin/js/user-profile.js src/wp-admin/js/user-profile.js
index e744814..de87bb9 100644
|
|
|
27 | 27 | |
28 | 28 | function bindPass1() { |
29 | 29 | var passStrength = $('#pass-strength-result')[0]; |
| 30 | var currentPass = $pass1.val(); |
30 | 31 | |
31 | 32 | $pass1Wrap = $pass1.parent(); |
32 | 33 | |
… |
… |
|
50 | 51 | } |
51 | 52 | |
52 | 53 | $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(); |
| 54 | if ( $pass1.val() === currentPass ) { |
| 55 | return; |
| 56 | } |
| 57 | |
| 58 | currentPass = $pass1.val(); |
| 59 | $pass1Text.val( currentPass ); |
| 60 | $pass1.add( $pass1Text ).removeClass( 'short bad good strong' ); |
| 61 | |
| 62 | if ( passStrength.className ) { |
| 63 | $pass1.add( $pass1Text ).addClass( passStrength.className ); |
| 64 | if ( 'short' === passStrength.className || 'bad' === passStrength.className ) { |
| 65 | if ( ! $weakCheckbox.prop( 'checked' ) ) { |
| 66 | $submitButtons.prop( 'disabled', true ); |
67 | 67 | } |
| 68 | $weakRow.show(); |
| 69 | } else { |
| 70 | $submitButtons.prop( 'disabled', false ); |
| 71 | $weakRow.hide(); |
68 | 72 | } |
69 | | }, 1 ); |
| 73 | } |
70 | 74 | } ); |
71 | 75 | } |
72 | 76 | |