Make WordPress Core

Changeset 34063


Ignore:
Timestamp:
09/11/2015 11:22:30 PM (9 years ago)
Author:
azaozz
Message:

Settings: reassign the label when switching password fields so it always highlights the visible field.

Props umesh.nevase.
Fixes #33778 4.3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3/src/wp-admin/js/user-profile.js

    r33980 r34063  
    77        $pass1,
    88        $pass1Text,
     9        $pass1Label,
    910
    1011        $pass2,
     
    108109                $pass1Text.focus();
    109110
     111                $pass1Label.attr( 'for', 'pass1-text' );
     112
    110113                if ( ! _.isUndefined( $pass1Text[0].setSelectionRange ) ) {
    111114                    $pass1Text[0].setSelectionRange( 0, 100 );
     
    127130                $pass1.focus();
    128131
     132                $pass1Label.attr( 'for', 'pass1' );
     133
    129134                if ( ! _.isUndefined( $pass1[0].setSelectionRange ) ) {
    130135                    $pass1[0].setSelectionRange( 0, 100 );
     
    140145
    141146        $pass1Row = $('.user-pass1-wrap');
     147        $pass1Label = $pass1Row.find('th label').attr( 'for', 'pass1-text' );
     148
    142149        // hide this
    143150        $('.user-pass2-wrap').hide();
Note: See TracChangeset for help on using the changeset viewer.