mardi 29 septembre 2015

Chrome autofills incorrect data type

On my site, there are two fields on the sign in page: one for email, one for password. If I have already signed up, log out, and go back to sign in, Chrome autofills the username into the email text box instead of the email address.

<div class="inputs">
      <%= devise_error_messages! %>
      <label id="maincontent" class="control-label sr-hidden" for="email">Email Address</label>
      <input id="email-input" name="email" type="email" required='true' autocompletetype='email' autofocus='true' placeholder='Enter your email address...'/>      
      <label class="control-label sr-hidden" for="password">Password</label>
      <%= f.password_field :password, :required => false, :placeholder => "Enter your password...", :id => "password" %>
</div>

In addition, if I delete the password field altogether, no autofill happens at all in the email field and it is left blank. If you click in the field, the drop down autocomplete menu pops up, however.




Aucun commentaire:

Enregistrer un commentaire