From 16b3d6d67c7e017d461ea17ed29ea9738dc77e83 Mon Sep 17 00:00:00 2001 From: Mike Rogers Date: Thu, 21 Dec 2017 19:13:50 +0000 Subject: [PATCH] Adding `autocomplete="email"` to email fields (#4643) As discussed in https://github.com/plataformatec/devise/issues/4635 --- app/views/devise/confirmations/new.html.erb | 2 +- app/views/devise/passwords/new.html.erb | 2 +- app/views/devise/registrations/edit.html.erb | 2 +- app/views/devise/registrations/new.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 2 +- app/views/devise/unlocks/new.html.erb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 2dc668fc..2dea3660 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -5,7 +5,7 @@
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> + <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 3d6d11aa..11b3d6af 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -5,7 +5,7 @@
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 1e66f3d7..10ed32a9 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -5,7 +5,7 @@
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 5a238ce6..602803cf 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -5,7 +5,7 @@
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index b261cfd1..3ebb001d 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -3,7 +3,7 @@ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index 16586bc7..cfe8aa81 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -5,7 +5,7 @@
<%= f.label :email %>
- <%= f.email_field :email, autofocus: true %> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %>