Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect autofill in safari #31600

Merged
merged 1 commit into from Sep 7, 2023
Merged

Fix incorrect autofill in safari #31600

merged 1 commit into from Sep 7, 2023

Conversation

avatus
Copy link
Contributor

@avatus avatus commented Sep 7, 2023

Fixes: #31592

Took me a bit to debug why this was happening. Apparently, autocomplete is ignored by almost every browser now. The only reason this showed up in safari specifically is, our input wasn't named or typed like "password" so the browsers think "cool, just an input". but safari actually also checks the PLACEHOLDER text, and since our placeholder text included the word "login", it would ignore the autocomplete and add the widget. You can test this out yourself by changing the placeholder text in this input field with something like "hi". Blew my mind.

The added name prop and value are what safari prescribes to ignore autofill.

Some info here with the answer found below the accepted answer (although its all good info)

@@ -127,6 +127,7 @@ const LoginItemList = ({
<Input
p="2"
m="2"
name="notsearch_password"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add explanation here? because i found it pretty strange too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@avatus avatus added this pull request to the merge queue Sep 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 7, 2023
@avatus avatus added this pull request to the merge queue Sep 7, 2023
Merged via the queue into master with commit ac4790a Sep 7, 2023
22 checks passed
@avatus avatus deleted the avatus/fix_login_options branch September 7, 2023 22:14
@public-teleport-github-review-bot

@avatus See the table below for backport results.

Branch Result
branch/v12 Create PR
branch/v13 Create PR
branch/v14 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Safari]: Login options blocked by Safari keychain widget
3 participants