[wp-trac] [WordPress Trac] #42888: Add a "Show" button next to password fields on mobile

WordPress Trac noreply at wordpress.org
Wed Dec 13 08:49:09 UTC 2017


#42888: Add a "Show" button next to password fields on mobile
----------------------------------------+------------------------------
 Reporter:  johnbillion                 |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Login and Registration      |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  javascript
----------------------------------------+------------------------------

Comment (by Iceable):

 > The `Show` button simply toggles the input type between password and
 text.

 This sounds like the most straightforward way to do it.

 The `Show` button on the "add new user" page is doing it in a more
 convoluted way: there is one `password` input and one `text` input (hidden
 with `display: none;`), each one mirrors the value of the other.

 Clicking the `Show` button toggles a `show-password` class on the wrapper
 around these two inputs, which in turns hides the `password` one and shows
 the `text` one.

 I wonder if there is a good reason to do it that way as opposed to what
 Facebook does.

 [[Image(https://i.imgur.com/oBR05JC.png)]]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42888#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list