htmlgoogle-chromechromiummicrosoft-edge-chromium

Is there a native "reveal password" feature for `<input type="password" />` in Chrome?


The following HTML code, when rendered in Edge (Windows), displays a "reveal password" button within the field:

Password: <input type="password" />

Password field rendered in Edge 123.0.2420.65

However, the same is not happening in Chrome:

Password field rendered in Chrome 123.0.6312.86

Is there some way to enable this behavior for our users (perhaps via some HTML attribute or a CSS rule)? Or the only way to have this functionality working cross-browser is still to develop it ourselves?

I guess the "reveal button" was Edge's original feature. But I found some old sources saying that the feature was coming to other Chromium browsers, too:

... but it's 5 years later, and such feature doesn't seem enabled by default in Chrome. Does anyone know if it was ever released to stable builds of Chrome? Maybe it's not enabled by default but there is some way to enable it for certain fields?


Solution

  • TL:DR; You're (currently) going to have to implement this yourself.

    There's not much in the specification about how the password input should be rendered beyond obscuring the value (emphasis mine):

    The input element represents a one line plain text edit control for the element's value. The user agent should obscure the value so that people other than the user cannot see it.

    The method of obscuring the password is not specified either