• Resolved Rohit Sachaan

    (@rohit1113)


    I see in version 3.9.0 an introduction of show-password-input span to toggle input type from password to text & vice-versa. But currently, the span only toggles input type from password to text. I noticed it under edit-account & reset-password screens.

    I found the following code in woocommerce/assets/js/frontend/woocommerce.js

    	$( '.show-password-input' ).click(
    		function() {
    			$( this ).toggleClass( 'display-password' );
    			if ( $( this ).hasClass( 'display-password' ) ) {
    				$( this ).siblings( ['input[name="password"]', 'input[type="password"]'] ).prop( 'type', 'text' );
    			} else {
    				$( this ).siblings( 'input[name="password"]' ).prop( 'type', 'password' );
    			}
    		}
    	);
    

    I guess the above error is because in both edit-account & reset-password screens input names are not password, rather than they are current_password, password_1 & password_2.

    So, should I change the selector instead of input[name="password"] to input[name*="password"].

    Will it be okay? Or plugin contributors are going to release a new version with a solution for this.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to switch back Password field to type password’ is closed to new replies.