Bug 51777

Summary: The wrong element get outline focus when dynamic created with autofocus
Product: WebKit Reporter: Andreas Madsen <amwebdk>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, amwebdk, ap, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Bug Depends on:    
Bug Blocks: 202651    
Attachments:
Description Flags
testcase none

Andreas Madsen
Reported 2010-12-31 07:27:31 PST
Created attachment 77718 [details] testcase TESTCASE: <!DOCTYPE html> <html> <head> <title>Testcase | Attribute | Autofocus</title> <meta charset="utf-8"> </head> <body> <input type="text" autofocus> <script type="text/javascript"> document.addEventListener( "DOMContentLoaded", function () { var input = document.createElement('input'); input.setAttribute('autofocus',true); document.body.appendChild(input); }, false); </script> </body> </html> RESULT: The first element got a blue outline focus, but dosn't have a "ready to write cursor". The second element have no outline, but dose have a "ready to write cursor". This is confusing.
Attachments
testcase (438 bytes, text/html)
2010-12-31 07:27 PST, Andreas Madsen
no flags
Alexey Proskuryakov
Comment 1 2010-12-31 21:22:50 PST
Confirmed with r74228 (not a regression from Safari 5).
Ahmad Saleem
Comment 2 2026-02-20 19:35:59 PST
I am unable to reproduce this on Safari Technology Preview 237 and it matches with Chrome Canary 147 as well.
Note You need to log in before you can comment on or make changes to this bug.