[Webkit-unassigned] [Bug 213982] New: WebKit autofocuses the last available autofocus element instead of the first available

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 5 20:29:09 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=213982

            Bug ID: 213982
           Summary: WebKit autofocuses the last available autofocus
                    element instead of the first available
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mjs at apple.com
                CC: cdumez at apple.com, wenson_hsieh at apple.com

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200706/6c310c4f/attachment.htm>


More information about the webkit-unassigned mailing list