Fix password visibility toggle (#25624)

This commit is contained in:
Bartosz Drewniak 2020-02-10 20:30:39 +01:00
parent 586bcc8bb4
commit 84e958dbde
1 changed files with 2 additions and 2 deletions

View File

@ -87,9 +87,9 @@ jQuery( function( $ ) {
function() {
$( this ).toggleClass( 'display-password' );
if ( $( this ).hasClass( 'display-password' ) ) {
$( this ).siblings( ['input[name="password"]', 'input[type="password"]'] ).prop( 'type', 'text' );
$( this ).siblings( ['input[name^="password"]', 'input[type="password"]'] ).prop( 'type', 'text' );
} else {
$( this ).siblings( 'input[name="password"]' ).prop( 'type', 'password' );
$( this ).siblings( 'input[name^="password"]' ).prop( 'type', 'password' );
}
}
);