2 ms·
Autofocusing the login field is a bad idea. Sometimes the javascript take some times to load and the user already filled the login field and is already typing i
by p4bl0 16y ago
Autofocusing the login field is a bad idea. Sometimes the javascript take some times to load and the user already filled the login field and is already typing is password when the javascript focus the login field: then the password is written in clear on the screen, and that's not pleasant for the users.
- lautis 16y agoThat's why you should use HTML5 autofocus attribute (perhaps with a JS fallback). http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofocusing-a-form-control http://www.whatwg.org/specs/web-apps/current-work/multipage/...
- joeyespo 16y agoYou could get around this by first checking if another field has input.
- pavel_lishin 16y agoI always embedded the focus javascript immediately after the username, so that as soon as that part of the DOM is loaded, the user's input is focused there.