Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

505
Visualizações
How to hide the eye from a password input in MS Edge and IE

I now found an answer: It just works when I add display: none !important;. I dont know, what exactly is blocking the display: none; but if someone else has this error, try to add !important and check that the input is an password field.

Original Question:

I have a password input with a custom added "show password" button. Now I want to remove the password button which is added by MS Edge and IE. I already tried:

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

and

input::-ms-reveal,
input::-ms-clear {
  display: none;
}

The ::ms-clear is working and removes the little x where the user can clear the input. But the ::ms-reveal isn't working. Tested in IE 11, MS Edge based on Chromium and newest MS Edge which isn't based on Chromium.

MS Edge, Chromium based, IE 11

The eye on the right is my custom added eye, the other one is the eye added by IE or Edge.

Here is my input styling:

/*
BASIC INPUT STYLING
*/

input, textarea, select {
    outline: none;
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    line-height: 1;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    color: #222222;
    background-color: transparent;
    border: 1px solid #CCCCCC;
    padding: 18px 22.5px;
    transition: border-color .15s ease-in-out;
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    border: 1px solid #999999;
}

.input-small input, .input-small select, .input-small textarea {
    font-size: 14px;
    padding: 9px 11.25px;
}

/*
INPUT WITH ICON STYLING
*/

.input-with-icon {
    position: relative;
}

.input-with-icon input, .input-with-icon select {
    padding-right: 62.5px;
}

.input-with-icon.input-small input, .input-with-icon.input-small select {
    padding-right: 32px;
}

.input-icon-div {
    height: 51px;
    border-radius: 6px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    position: absolute;
    right: 5px;
    bottom: 2px;
    cursor: pointer;
}

.input-small .input-icon-div {
    font-size: 14px;
    height: 27px;
    width: 25px;
}

and the HTML:

<div class="input-with-icon">
    <input type="password" name="password" id="password" class="" maxlength="255">
    <div class="input-icon-div">
        <i class="far fa-eye"></i>
    </div>
</div>
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I tried to test your both codes 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 check 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 is only shows for the IE 10 version.

over 4 years ago · Santiago Trujillo Relatório

0

It still shows in Edge as of version 92 when once you type something in the field. According to Edge docs, the solution is

::-ms-reveal {
    display: none;
}

They also show ways to customize the button

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda