Auto complete Chrome bringing wrong fields as login

Asked

Viewed 662 times

0


I have a problem with a criminal record. When registering the browser asks if it wants to save the user and password, the problem is that it saves a field nothing see as user but the password it writes correctly. My form looks like this:

<form id="form_cadastro" autocomplete="off">
   <div id="passo1">
     <input name="email" id="email" type="email" class="validate" />
   </div>
   <div id="passo2">
     <input name="nome" id="nome" type="text" />
   </div>
   <div id="passo3">
     <input name="endereco" id="endereco" type="text" />
     <input name="complemento" id="complemento" type="text" />
   </div>
   <div id="passo4">
     <input name="senha" id="senha" type="password" />
   </div>
</form>

But when giving a submit via $.post Jquery in the form, and redirecting the page the browser is saving(asking to save) the value of the field complemento(do endereço) as user! So when the user goes to the login screen the Auto complete/Auto Fill Browser brings in the user field (which is the email) the value of the complement field:

<form id="form_cadastro" autocomplete="off">
     <input name="email" id="email" type="email" class="validate" /> // Autocomplete vindo o complemento(do endereço)
     <input name="senha" id="senha" type="password" />
</form>

I’d have some way of settling this in a way that doesn’t use too much gambiarra?

  • https://developers.google.com/web/updates/2015/06/checkout-faster-with-autofill tries to use the autocomplete attribute in the input

  • 1

    @Rovannlinhalis that never worked for me :P.

  • Put the email input above the password input (instead of the add-on) and see which animal will give.

  • Makes sense that Dae @Leocaracciolo rsrs

  • Chrome with login and password is annoying, plus give that undesirable yellowish in the field of a page that is not his

1 answer

2


In this case, when the browser asks if it wants to save the user and password AND YOU ACCEPT, I don’t know why, Chrome assumes that the input immediately above the password input is from the user.

Just check these two examples I posted on my server

add-on above the password

email above password

and see that my comment, although it sounds hilarious, is founded.

NOTE: the HTML used are those of the author of the question.

It remains clear that you would have to have logged in and password on the examples website and accept save when Chrome asks.

By test name do login here accept save and then access the examples

  • NOTE: after logging in and accepting, you can close the redirected page that is part of a reply from another post.


text translated by google from the post below" -> I just found out that if you have a username and password remembered for a site, the current version of Chrome will automatically populate your username / email address in the field before any type=passwordfield. You don’t care about the field call - only takes the field before the password is your username."

More about this problem see here

  • "killed the snake and showed the stick kkk", man I wonder why the only thing you find on the internet is talking about the autocomplete="off" and it doesn’t even work this bagasse. I did the test here and gave his theory straight. It’s a pity the browsers do not have a solution more "cross-browser" for this annoying problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.