mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 10:22:23 +01:00
Settings: reassign the label when switching password fields so it always highlights the visible field.
Props umesh.nevase. Fixes #33778 4.3. Built from https://develop.svn.wordpress.org/branches/4.3@34063 git-svn-id: http://core.svn.wordpress.org/branches/4.3@34031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f25a307f5
commit
17ae4e9fb9
@ -6,6 +6,7 @@
|
||||
$pass1Wrap,
|
||||
$pass1,
|
||||
$pass1Text,
|
||||
$pass1Label,
|
||||
|
||||
$pass2,
|
||||
|
||||
@ -107,6 +108,8 @@
|
||||
|
||||
$pass1Text.focus();
|
||||
|
||||
$pass1Label.attr( 'for', 'pass1-text' );
|
||||
|
||||
if ( ! _.isUndefined( $pass1Text[0].setSelectionRange ) ) {
|
||||
$pass1Text[0].setSelectionRange( 0, 100 );
|
||||
}
|
||||
@ -126,6 +129,8 @@
|
||||
|
||||
$pass1.focus();
|
||||
|
||||
$pass1Label.attr( 'for', 'pass1' );
|
||||
|
||||
if ( ! _.isUndefined( $pass1[0].setSelectionRange ) ) {
|
||||
$pass1[0].setSelectionRange( 0, 100 );
|
||||
}
|
||||
@ -139,6 +144,8 @@
|
||||
$cancelButton;
|
||||
|
||||
$pass1Row = $('.user-pass1-wrap');
|
||||
$pass1Label = $pass1Row.find('th label').attr( 'for', 'pass1-text' );
|
||||
|
||||
// hide this
|
||||
$('.user-pass2-wrap').hide();
|
||||
|
||||
|
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
Loading…
Reference in New Issue
Block a user