better onload focusing
October 13th, 2004 by Dylan
Numerous sites capture the onload event handler to move focus to a specific form field, usually for logging in (for example, My Yahoo!). Other sites will even clear the current text in the field in addition to providing focus (for example, American Express). However, they both exhibit a really annoying behavior: when the page is slow to load, the user will usually click in the field and start typing in their login information, only to be interrupted with a change in focus when the page finally loads. A significant improvement to usability would be to first check to see what the current focus is, and only set the focus if it is not already set to a form element. This change is really quite simple, and I am surprised that so many major sites do not consider this when providing onload focusing.