diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 8cef19818a4..956baa5b40c 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -14,7 +14,10 @@
<%= validated_form_for(@password_reset_email_form,
url: user_password_path,
html: { autocomplete: 'off', method: :post, role: 'form' }) do |f| %>
- <%= f.input :email, required: true, input_html: { aria: { invalid: false, describedby: 'email-description' } } %>
+ <%= f.input :email,
+ required: true,
+ input_html: { autocorrect: 'off',
+ aria: { invalid: false, describedby: 'email-description' } } %>
<%= f.input :request_id, as: :hidden, input_html: { value: request_id } %>
<%= render 'shared/recaptcha' %>
<%= f.button :submit, t('forms.buttons.continue'), class: 'margin-top-2' %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 02d433fb4b7..19702c4225c 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -24,7 +24,9 @@
<%= f.input :email,
label: t('account.index.email'),
required: true,
- input_html: { class: 'margin-bottom-6', aria: { invalid: false } } %>
+ input_html: { class: 'margin-bottom-6',
+ autocorrect: 'off',
+ aria: { invalid: false } } %>
<%= f.input :password,
label: t('account.index.password'),
required: true,
diff --git a/app/views/sign_up/registrations/new.html.erb b/app/views/sign_up/registrations/new.html.erb
index 8100ef509ae..4643143cf7f 100644
--- a/app/views/sign_up/registrations/new.html.erb
+++ b/app/views/sign_up/registrations/new.html.erb
@@ -14,7 +14,10 @@
<%= validated_form_for(@register_user_email_form,
html: { autocomplete: 'off', role: 'form' },
url: sign_up_register_path) do |f| %>
- <%= f.input :email, label: t('forms.registration.labels.email'), required: true, input_html: { aria: { invalid: false } } %>
+ <%= f.input :email,
+ label: t('forms.registration.labels.email'),
+ required: true,
+ input_html: { autocorrect: "off", aria: { invalid: false } } %>
<%= t('sign_up.email.invalid_email_alert_inline') %>
diff --git a/spec/views/devise/passwords/new.html.erb_spec.rb b/spec/views/devise/passwords/new.html.erb_spec.rb
index 74205483fb5..121210f7de0 100644
--- a/spec/views/devise/passwords/new.html.erb_spec.rb
+++ b/spec/views/devise/passwords/new.html.erb_spec.rb
@@ -45,6 +45,12 @@
expect(rendered).to have_xpath("//form[@autocomplete='off']")
end
+ it 'sets input autocorrect to off' do
+ render
+
+ expect(rendered).to have_xpath("//input[@autocorrect='off']")
+ end
+
it 'has a cancel link that points to the decorated_session cancel_link_url' do
render
diff --git a/spec/views/devise/sessions/new.html.erb_spec.rb b/spec/views/devise/sessions/new.html.erb_spec.rb
index 578f7ef6f61..b5213e7305b 100644
--- a/spec/views/devise/sessions/new.html.erb_spec.rb
+++ b/spec/views/devise/sessions/new.html.erb_spec.rb
@@ -18,6 +18,12 @@
expect(rendered).to match(/