Passwords: Use keyup event to prevent IE8's misinterpretation of propertychange.

Props adamsilverstein, peterwilsoncc.
Fixes #33385.


Built from https://develop.svn.wordpress.org/trunk@33625


git-svn-id: http://core.svn.wordpress.org/trunk@33592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-08-17 18:46:25 +00:00
parent 2de7757124
commit 69146f6b10
3 changed files with 9 additions and 7 deletions

View File

@ -47,7 +47,7 @@
.addClass( $pass1[0].className )
.data( 'pw', $pass1.data( 'pw' ) )
.val( $pass1.val() )
.on( 'input propertychange', function () {
.on( 'keyup', function () {
if ( $pass1Text.val() === currentPass ) {
return;
}
@ -62,13 +62,15 @@
generatePassword();
}
$pass1.on( 'input propertychange pwupdate', function () {
$pass1.on( 'keyup pwupdate', function () {
if ( $pass1.val() === currentPass ) {
return;
}
currentPass = $pass1.val();
$pass1Text.val( currentPass );
if ( $pass1Text.val() !== currentPass ) {
$pass1Text.val( currentPass );
}
$pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
if ( passStrength.className ) {
@ -163,7 +165,7 @@
* This fixes the issue by copying any changes from the hidden
* pass2 field to the pass1 field, then running check_pass_strength.
*/
$pass2 = $('#pass2').on( 'input propertychange', function () {
$pass2 = $('#pass2').on( 'keyup', function () {
if ( $pass2.val().length > 0 ) {
$pass1.val( $pass2.val() );
$pass2.val('');
@ -244,7 +246,7 @@
var $colorpicker, $stylesheet, user_id, current_user_id,
select = $( '#display_name' );
$('#pass1').val('').on( 'input propertychange pwupdate', check_pass_strength );
$('#pass1').val('').on( 'keyup pwupdate', check_pass_strength );
$('#pass-strength-result').show();
$('.color-palette').click( function() {
$(this).siblings('input[name="admin_color"]').prop('checked', true);

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-RC2-33624';
$wp_version = '4.3-RC2-33625';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.