[whatwg] Autofocus attribute
Brian Wilson
brian at opera.com
Tue Aug 3 14:04:24 PDT 2004
I was trying to create a few test cases for the autofocus attribute and I
thought of an interesting scenario:
Two form fields walk in to a bar...
*cough*
I mean... Two form fields are in a document, one has the
autofocus="autofocus" attribute set, the other is given focus by the
focus() javascript method at body onLoad time. Which should have focus
when the document finishes loading? In other words, how does/should the
autofocus attribute figure in to the document loading event chain
chronology?
The only prose to deal with this issue (sect. 2.14) says:
"This implies that during document load, the last form control
with this attribute set is the one that should have focus once
the document is loaded."
but it doesn't seem to address this specific chronology issue.
-Brian
--
Brian Wilson
Opera Core QA
More information about the whatwg
mailing list