WebKit autofocuses the last available autofocus element instead of the first available. Other browsers autofocus the first. Here is a test case: https://mehdi.cc/tests/multiple-autofocus/ In Safari, this focuses Field 2. In Firefox and Chrome, Field 1. The spec says to autofocus the first. Well, sort of... autofocus for purposes of page load focus is only considered at element insertion time, not when the attribute is added or removed; and it's not the first element in document order that wins, it's the first (eligible) to be inserted. Full spec details are here: https://html.spec.whatwg.org/#the-autofocus-attribute
<rdar://problem/65116588>
*** This bug has been marked as a duplicate of bug 203139 ***