feat(web): add autocomplete fields to first factor and reset password pages (#2125)

This commit is contained in:
dakriy 2021-06-30 10:04:55 -07:00 committed by GitHub
parent 87c3985c75
commit 851396c972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,7 @@ const FirstFactorForm = function (props: Props) {
onChange={(v) => setUsername(v.target.value)} onChange={(v) => setUsername(v.target.value)}
onFocus={() => setUsernameError(false)} onFocus={() => setUsernameError(false)}
autoCapitalize="none" autoCapitalize="none"
autoComplete="username"
onKeyPress={(ev) => { onKeyPress={(ev) => {
if (ev.key === "Enter") { if (ev.key === "Enter") {
if (!username.length) { if (!username.length) {
@ -124,6 +125,7 @@ const FirstFactorForm = function (props: Props) {
onChange={(v) => setPassword(v.target.value)} onChange={(v) => setPassword(v.target.value)}
onFocus={() => setPasswordError(false)} onFocus={() => setPasswordError(false)}
type="password" type="password"
autoComplete="current-password"
onKeyPress={(ev) => { onKeyPress={(ev) => {
if (ev.key === "Enter") { if (ev.key === "Enter") {
if (!username.length) { if (!username.length) {

View File

@ -99,6 +99,7 @@ const ResetPasswordStep2 = function () {
onChange={(e) => setPassword1(e.target.value)} onChange={(e) => setPassword1(e.target.value)}
error={errorPassword1} error={errorPassword1}
className={classnames(style.fullWidth)} className={classnames(style.fullWidth)}
autoComplete="new-password"
/> />
</Grid> </Grid>
<Grid item xs={12}> <Grid item xs={12}>
@ -118,6 +119,7 @@ const ResetPasswordStep2 = function () {
} }
}} }}
className={classnames(style.fullWidth)} className={classnames(style.fullWidth)}
autoComplete="new-password"
/> />
</Grid> </Grid>
<Grid item xs={6}> <Grid item xs={6}>