Bug 129743

Summary: "autofocus" attribute handling is not compatible with other browsers
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dbates, rniwa, syoichi, tkent, webkit-bug-importer
Priority: P2 Keywords: BlinkMergeCandidate, InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: data:text/html,<input autofocus> <input autofocus>
Bug Depends on:    
Bug Blocks: 202651    

Description David Kilzer (:ddkilzer) 2014-03-05 09:53:52 PST
From <https://code.google.com/p/chromium/issues/detail?id=336346>:

Version: All
OS: All

What steps will reproduce the problem?
1. Open the following URL:
   data:text/html,<input autofocus> <input autofocus>

What is the expected output? What do you see instead?
Expected: According to the standard, Firefox, and IE11, the first <input> gets focus.
Actual: The second <input> gets focus.
Comment 1 David Kilzer (:ddkilzer) 2014-03-05 09:55:39 PST
<rdar://problem/16220095>
Comment 2 David Kilzer (:ddkilzer) 2014-03-05 09:57:44 PST
Blink merge candidate:  <http://src.chromium.org/viewvc/blink?view=rev&rev=165459>
Comment 3 Kent Tamura 2019-08-16 02:56:19 PDT
The autofocus processing algorithm will be updated by https://github.com/whatwg/html/pull/4763.

Anyway, "data:text/html,<input autofocus> <input autofocus>" should still focus on the first <input>.
Comment 4 Ryosuke Niwa 2019-10-17 22:09:39 PDT
New behavior will be implemented in https://bugs.webkit.org/show_bug.cgi?id=203139 instead.
Comment 5 Ryosuke Niwa 2019-10-17 22:11:13 PDT

*** This bug has been marked as a duplicate of bug 203139 ***