Skip to content

Fixed password_toggle visibility is reversed #4888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

SaliniVenate
Copy link

Currently, when using app:endIconMode="password_toggle">, the visibility of password is swapped, when eye is open: pasword is not visible and when eye is closed password is hidden.

Thanks for starting a pull request on Material Components!

Don't forget:

  • [] Identify the component the PR relates to in brackets in the title.
    [Buttons] Updated documentation
  • Link to GitHub issues it solves. closes #1234
  • Sign the CLA bot. You can do this once the pull request is opened.

Contributing
has more information and tips for a great pull request.

Copy link

google-cla bot commented Jul 31, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Currently, when using app:endIconMode="password_toggle">,
the visibility of password is swapped, when eye is open:
pasword is not visible and when eye is closed password is
hidden.

Signed-off-by: Ankit Agrawal <[email protected]>
Signed-off-by: Salini Venate <[email protected]>
@dsn5ft
Copy link
Contributor

dsn5ft commented Jul 31, 2025

Hi, this is actually intentional because the icon is meant to show the action, not the current state. I.e., clicking on the "open eye" will show the password in plain text. Clicking on the "closed eye" will hide the password.

See #4827 and #1171.

@dsn5ft dsn5ft closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants