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

Problems with saved passwords #14

Closed
dominykas opened this issue Dec 1, 2010 · 3 comments
Closed

Problems with saved passwords #14

dominykas opened this issue Dec 1, 2010 · 3 comments
Labels

Comments

@dominykas
Copy link

I haven't tested this extensively, cause I don't have all the browsers on me now, but here's the deal - if you use placeholder text for password/username fields, the results sometimes become unpredictable when the users choose to save their passwords.

All tests performed with a simplified demo.html - removed all fields but the text and password, and gave the text field name="username" (to trigger saving passwords). To trigger the "save password?" on Chrome, demo must submit to a different location (not to self).

Steps to reproduce in most cases:

  1. Load the page
  2. Enter u/p
  3. Submit
  4. Save the password
  5. Close the tab
  6. Open the page again

Results:
O10.63@Ubuntu, O11a@W2K8: the "password" field doesn't have the indicator (yellow inside border) - not a biggie. Hitting ctrl+enter to fill in the form fills in the details, but "placeholder" class is not removed - not a biggie.
IE8@W7, IE9@W2K8: focus into username field, select username from autocomplete dropdown - the password placeholder text still displays, as if the password wasn't filled in. Focus into the password field - the saved password is retrieved OK. Not a biggie - pretty much like Opera.
FF3.6.12@Ubuntu, FF3.6.12@W2K8: for some reason, the "saved username" contains the placeholder of the password (is it because of the unnamed fake password field?) - problematic - could be a bug in FF itself, but the users don't know that, right?...
FF4b7@W2K8, Cr7@W2K8, Cr8@Ubuntu: support placeholder natively.

I didn't test it right now, but the problem becomes even worse if you have multiple usernames/passwords saved for the same form - also, not sure how common that is in real life.

I'm afraid I can't really offer a solution for this - especially considering that some browsers don't report the value for autocompleted password fields (if I remember correctly, having had these issues in a similar implementation a while back).

In practice, I've so far avoided using placeholders for password fields.

Side issue: there may be issues with IE6/7 (I think) maintaining the focus of the fields after hitting "Back" (or was it F5?) - the field is focused, but the focus event is never fired, so the placeholder is inserted. Probably also worth testing this with "autofocus" (where supported).

@mathiasbynens
Copy link
Owner

Thanks for the detailed bug report. Unfortunately, you might be right:

I'm afraid I can't really offer a solution for this - especially considering that some browsers don't report the value for autocompleted password fields (if I remember correctly, having had these issues in a similar implementation a while back).

As far as I know, there’s no way to prevent the issues you mentioned.

Leaving this bug open in case someone comes up with a brilliant idea :)

@amerikan amerikan added bug and removed bug labels Dec 30, 2014
@amerikan
Copy link
Collaborator

Maybe something like:

Iterate through each input/textarea element setting focus to it. On focus check if input has a text value already, if it does don't apply placeholder text.

@dominykas
Copy link
Author

stalebot-ing myself.

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

No branches or pull requests

3 participants