From 84e958dbde3b24ce58fef7aaae0b6ca6b46f553e Mon Sep 17 00:00:00 2001 From: Bartosz Drewniak Date: Mon, 10 Feb 2020 20:30:39 +0100 Subject: [PATCH] Fix password visibility toggle (#25624) --- assets/js/frontend/woocommerce.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/frontend/woocommerce.js b/assets/js/frontend/woocommerce.js index e50d581159a..6c6047558cd 100644 --- a/assets/js/frontend/woocommerce.js +++ b/assets/js/frontend/woocommerce.js @@ -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' ); } } );