How to hide the eye from a password input in MS Edge and IE [duplicate]

I tried to test both of your code snippets on the IE 11, MS Edge legacy browser, MS Edge Chromium browser and Firefox.

It worked on my side and it is not showing the Reveal password button (Eye).

Tested code:

<!DOCTYPE html>
<html>
  <head>
    <style>
      input::-ms-reveal,
      input::-ms-clear {
        display: none;
      }
    </style>
  </head>
  <body>
    Password: <input type="password" value="" id="myInput" /><br /><br />
  </body>
</html>

Output in IE 11 browser:

enter image description here

Output in MS Edge legacy browser:

enter image description here

Output in MS Edge Chromium browser:

enter image description here

I checked the documentation and found this information.

Non-standard:

This feature is non-standard and is not on a standards
track. Do not use it on production sites facing the Web: it will not
work for every user. There may also be large incompatibilities between
implementations and the behavior may change in the future.

Browser compatibility only shows the IE 10 version.

Leave a Comment

tech