You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Load the page
Enter u/p
Submit
Save the password
Close the tab
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).
The text was updated successfully, but these errors were encountered:
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 :)
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.
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:
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).
The text was updated successfully, but these errors were encountered: