[Webkit-unassigned] [Bug 49300] New: autofocus attribute on input in hidden div causes dynamic display of div to fail

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 9 22:32:14 PST 2010


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

           Summary: autofocus attribute on input in hidden div causes
                    dynamic display of div to fail
           Product: WebKit
           Version: 525.x (Safari 3.2)
          Platform: All
               URL: http://amp.ishiboo.com/webkit_autofocus_bug.html
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andrew at ishiboo.com


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).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list