WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
49300
autofocus attribute on input in hidden div causes dynamic display of div to fail
https://bugs.webkit.org/show_bug.cgi?id=49300
Summary
autofocus attribute on input in hidden div causes dynamic display of div to fail
Andrew Paprocki
Reported
2010-11-09 22:32:14 PST
I created the above URL,
http://amp.ishiboo.com/webkit_autofocus_bug.html
with a 44 line stand-alone test case to reproduce this problem. The second div starts out hidden and has an input with the autofocus attribute. When the first div is clicked upon, the second div is made visible. At this point, clicking the checkbox will toggle the sensitivity of the second input box (setting input.disabled=''), the label associated with it (via css selector), and the fieldset it lives in (setting className = 'enabled'). None of these have any effect while the autofocus attribute remains on the first input box. To see the page working properly, two things make it work: 1) Change the second div from display:none to display:block. If the second div is visible to start with, the checkbox always works. 2) Remove the autofocus attribute from the first input field. Even if the second div is display:none to begin with, if the autofocus attribute is removed, the checkbox works when the second div is dynamically shown. I tested and this bug exists on Chrome 7, as well as Safari in latest iOS on both iPhone and iPad. The webpage works as expected in Firefox 4 / IE 8 (probably because they do not support autofocus yet).
Attachments
stand-alone test case
(1.69 KB, text/html)
2010-11-10 05:14 PST
,
Andrew Paprocki
no flags
Details
Another simple test case showing autofocus breaking stuff
(689 bytes, application/zip)
2010-11-25 06:04 PST
,
Daniel Fazekas
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Andrew Paprocki
Comment 1
2010-11-10 05:14:23 PST
Created
attachment 73490
[details]
stand-alone test case
Daniel Fazekas
Comment 2
2010-11-25 06:04:37 PST
Created
attachment 74867
[details]
Another simple test case showing autofocus breaking stuff Added my test case. There's no need for checkboxes or for the autofocus field to start hidden. There's simply a button to hide a div which will have no effect in WebKit-based browsers if the autofocused input remains.
Ryosuke Niwa
Comment 3
2019-10-07 13:33:53 PDT
This seems working as intended now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug