WordPress.org

Make WordPress Core

Changeset 25848


Ignore:
Timestamp:
10/18/2013 06:49:47 PM (6 years ago)
Author:
nacin
Message:

About page: Prevent the meter from briefly sticking on 'Strong' when the animation resets.

props jorbin.
see #25603.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/about.js

    r25839 r25848  
    2323        }
    2424    }
     25    function resetMeter(){
     26        $input.val('');
     27        $('#pass-strength-result').text(indicatorString);
     28        $('#pass-strength-result').removeClass('short bad good strong');
     29    }
    2530
    2631    function animate(){
     
    3136            updateResult();
    3237        } else {
    33             $input.val('');
    34             $('#pass-strength-result').removeClass('short bad good strong');
     38            resetMeter();
    3539        }
    3640        // Look like real typing by changing the speed new letters are added each time
     
    4953    $input.on('focus', function(){
    5054        shouldAnimate = false;
    51         $('#pass-strength-result').removeClass('short bad good strong');
    52         $('#pass-strength-result').text(indicatorString);
    53         $input.val('')
     55        resetMeter();
    5456    });
    5557
Note: See TracChangeset for help on using the changeset viewer.