Skip to content

Commit 666dcae

Browse files
authored
Revert "autocomplete with email in email fields (#6502)" (#6574)
This reverts commit e5ec992. The choice of `username` over `email` for the autocomplete attribute has been discussed in the PR that introduced it. In short, the `username` is recognized by browsers and password managers. Not that prior to this change, some of the fields had `autocomplete="username"` and some had `autocomplete="email"`, which was inconsistent.
1 parent c43422e commit 666dcae

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

priv/templates/phx.gen.auth/login_live.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
4747
field={f[:email]}
4848
type="email"
4949
label="Email"
50-
autocomplete="email"
50+
autocomplete="username"
5151
spellcheck="false"
5252
required
5353
phx-mounted={JS.focus()}
@@ -72,7 +72,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
7272
field={f[:email]}
7373
type="email"
7474
label="Email"
75-
autocomplete="email"
75+
autocomplete="username"
7676
spellcheck="false"
7777
required
7878
/>

priv/templates/phx.gen.auth/registration_new.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
field={f[:email]}
1919
type="email"
2020
label="Email"
21-
autocomplete="email"
21+
autocomplete="username"
2222
spellcheck="false"
2323
required
2424
phx-mounted={JS.focus()}

priv/templates/phx.gen.auth/session_new.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
field={f[:email]}
3434
type="email"
3535
label="Email"
36-
autocomplete="email"
36+
autocomplete="username"
3737
spellcheck="false"
3838
required
3939
phx-mounted={JS.focus()}
@@ -51,7 +51,7 @@
5151
field={f[:email]}
5252
type="email"
5353
label="Email"
54-
autocomplete="email"
54+
autocomplete="username"
5555
spellcheck="false"
5656
required
5757
/>

priv/templates/phx.gen.auth/settings_edit.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
field={f[:email]}
1414
type="email"
1515
label="Email"
16-
autocomplete="email"
16+
autocomplete="username"
1717
spellcheck="false"
1818
required
1919
/>

0 commit comments

Comments
 (0)