Skip to content

Fix incorrect autofill in safari#31600

Merged
avatus merged 1 commit intomasterfrom
avatus/fix_login_options
Sep 7, 2023
Merged

Fix incorrect autofill in safari#31600
avatus merged 1 commit intomasterfrom
avatus/fix_login_options

Conversation

@avatus
Copy link
Copy Markdown
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)

Copy link
Copy Markdown
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
Copy Markdown
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 force-pushed the avatus/fix_login_options branch from 881ee49 to 62b4377 Compare September 7, 2023 21:27
@avatus avatus enabled auto-merge September 7, 2023 21:28
@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
@avatus avatus deleted the avatus/fix_login_options branch September 7, 2023 22:14
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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