Skip to content

Commit

Permalink
Fix incorrect autofill in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
avatus committed Sep 7, 2023
1 parent 28e6b32 commit 62b4377
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/packages/shared/components/MenuLogin/MenuLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ const LoginItemList = ({
<Input
p="2"
m="2"
// this prevents safari from adding the autofill options which would cover the available logins and make it
// impossible to select. "But why would it do that? this isn't a username or password field?".
// Safari includes parsed words in the placeholder as well to determine if that autofill should show.
// Since our placeholder has the word "login" in it, it thinks its a login form.
// https://github.com/gravitational/teleport/pull/31600
// https://stackoverflow.com/questions/22661977/disabling-safari-autofill-on-usernames-and-passwords
name="notsearch_password"
onKeyPress={onKeyPress}
type="text"
autoFocus
Expand Down

0 comments on commit 62b4377

Please sign in to comment.