Published at
Updated at
Reading time

I read the new course on Forms today and learned a surprising fact about forms in Microsoft Edge.

Did you know that Edge provides a "password reveal" button in password fields? That's right; password fields include a little clickable "eye icon" to show and hide the entered password.

A password field in MS Edge including a "reveal password" button.

However, a great usability feature only available in one browser isn't great. 🤷‍♂️ If you want to provide password reveal functionality to all browsers, you still have to implement it yourself. And that means you have to get rid of Edge's little gimmick.

To hide Edge's additional password functionality, use this cryptic pseudo-element. 👇

::-ms-reveal {
  display: none

If you're using Edge, play with the pseudo-element below.


And if you want to learn more about this functionaliy, check the Microsoft Edge Reference docs.

Was this snippet helpful?
Yes? Cool! You might want to check out Web Weekly for more snippets. The last edition went out 18 days ago.

Related Topics

Related Articles

About the author

Stefan standing in the park in front of a green background

Frontend nerd with over ten years of experience, "Today I Learned" blogger, conference speaker, Tiny helpers maintainer, and DevRel at Checkly.