[whatwg] Two propositions for the autofocus attribute

Markus Ernst derernst at gmx.ch
Mon Apr 26 05:22:39 PDT 2010


Am 25.04.2010 22:08 schrieb Eitan Adler:
>> - multiple autofocused elements per page are valid, but only one per form
> Is it possible to focus on multiple elements at the same time even in
> different forms? If they are both text boxes and a user types which
> element gets the keyboard input?
> 
> Autofocus only really makes at load time - for any other dynamic focus
> I think .focus() should be used.

Maybe my suggestion was misunderstandable? I meant to suggest that:
- Multiple autofocused form elements are valid (the validator does not 
complain about them), but only the first one is actually focused at load 
time.
- "Load time" is either when the page is loaded, or when a whole new 
form is inserted via XHR.



More information about the whatwg mailing list