Make WordPress Core

Opened 5 years ago

Last modified 2 years ago

#30023 new defect (bug)

Chrome autofill password keeps showing after wp_attempt_focus clears password field

Reported by: Robbert S Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.0
Component: Login and Registration Keywords:
Focuses: ui, javascript Cc:
PR Number:


Chrome's autofill of remembered passwords causes an issue with wp_attempt_focus (defined in wp-login.php). The JavaScript function clears the password field, but Chrome still displays the field as filled out.

Submitting the form results in the following error (obviously):

  • ERROR: The password field is empty.

If people want to have Chrome autofill their password, I strongly suggest not to intervene. Not only are we going to annoy users by trying to hack around it (see ticket 24364), but the hacks will also likely cause even more issues in a future Chrome release.

Change History (6)

#1 @joedolson
5 years ago

  • Focuses accessibility removed

#2 @helen
4 years ago

  • Keywords reporter-feedback added

Sorry you never got a response here - is this still an issue? I may be misunderstanding the function as I'm reading it, but it looks like it should only clear on a failed login attempt. It also seems buggy for Chrome to show the field as non-empty when it is empty.

#3 @afercia
4 years ago

Yep, seems Chrome is a bit buggy here, see for example: https://code.google.com/p/chromium/issues/detail?id=378419

It's still an issue after a failed login attempt: Chrome will display the password field filled with "dots" while it's actually empty.

By the way, wondering why wp_attempt_focus() should try to empty the fields in the first place. Wouldn't be enough to focus and select them?

#4 @swissspidy
4 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to Future Release

This annoys me every time I try to log into a WordPress site.

Apparently for Chrome it's a wontfix, but since WordPress is causing this issue, I think we should to something about it.

#5 @afercia
3 years ago

See also #40301.

#6 @ocean90
2 years ago

#41754 was marked as a duplicate.

Note: See TracTickets for help on using tickets.