mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-03 10:07:53 +02:00
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:
parent
2de7757124
commit
69146f6b10
@ -47,7 +47,7 @@
|
|||||||
.addClass( $pass1[0].className )
|
.addClass( $pass1[0].className )
|
||||||
.data( 'pw', $pass1.data( 'pw' ) )
|
.data( 'pw', $pass1.data( 'pw' ) )
|
||||||
.val( $pass1.val() )
|
.val( $pass1.val() )
|
||||||
.on( 'input propertychange', function () {
|
.on( 'keyup', function () {
|
||||||
if ( $pass1Text.val() === currentPass ) {
|
if ( $pass1Text.val() === currentPass ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -62,13 +62,15 @@
|
|||||||
generatePassword();
|
generatePassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
$pass1.on( 'input propertychange pwupdate', function () {
|
$pass1.on( 'keyup pwupdate', function () {
|
||||||
if ( $pass1.val() === currentPass ) {
|
if ( $pass1.val() === currentPass ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPass = $pass1.val();
|
currentPass = $pass1.val();
|
||||||
|
if ( $pass1Text.val() !== currentPass ) {
|
||||||
$pass1Text.val( currentPass );
|
$pass1Text.val( currentPass );
|
||||||
|
}
|
||||||
$pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
|
$pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
|
||||||
|
|
||||||
if ( passStrength.className ) {
|
if ( passStrength.className ) {
|
||||||
@ -163,7 +165,7 @@
|
|||||||
* This fixes the issue by copying any changes from the hidden
|
* This fixes the issue by copying any changes from the hidden
|
||||||
* pass2 field to the pass1 field, then running check_pass_strength.
|
* 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 ) {
|
if ( $pass2.val().length > 0 ) {
|
||||||
$pass1.val( $pass2.val() );
|
$pass1.val( $pass2.val() );
|
||||||
$pass2.val('');
|
$pass2.val('');
|
||||||
@ -244,7 +246,7 @@
|
|||||||
var $colorpicker, $stylesheet, user_id, current_user_id,
|
var $colorpicker, $stylesheet, user_id, current_user_id,
|
||||||
select = $( '#display_name' );
|
select = $( '#display_name' );
|
||||||
|
|
||||||
$('#pass1').val('').on( 'input propertychange pwupdate', check_pass_strength );
|
$('#pass1').val('').on( 'keyup pwupdate', check_pass_strength );
|
||||||
$('#pass-strength-result').show();
|
$('#pass-strength-result').show();
|
||||||
$('.color-palette').click( function() {
|
$('.color-palette').click( function() {
|
||||||
$(this).siblings('input[name="admin_color"]').prop('checked', true);
|
$(this).siblings('input[name="admin_color"]').prop('checked', true);
|
||||||
|
2
wp-admin/js/user-profile.min.js
vendored
2
wp-admin/js/user-profile.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user