[Webkit-unassigned] [Bug 53860] New: style.display affecting the initial selectedIndex value of a <select> when it's multiple attribute is set programatically

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 5 15:17:20 PST 2011


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

           Summary: style.display affecting the initial selectedIndex
                    value of a <select> when it's multiple attribute is
                    set programatically
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: priyajeet.hora at gmail.com


Created an attachment (id=81378)
 --> (https://bugs.webkit.org/attachment.cgi?id=81378&action=review)
testcase

Downstream bug - http://code.google.com/p/chromium/issues/detail?id=71398

See the attached html.
It has a simple <select> element which has a display:none on it.
It does not have multiple=true on it initially, which is set later programmatically onload.

By default single selects as above have a selectedIndex = 0 as per w3c spec.
When this select's mutiple attribute is set to true via javascript, it should retain its selectedIndex = 0.
So converting that select to multiple select should still output selectedIndex = 0.

However this doesn't work as expected in webkit when there is display:none on the select.
Webkit outputs -1 while FF, IE, Opera output 0.

Removal of the display:none gives consistent behavior among all browsers.
So it seems the display style is affecting the selects initial selectedIndex.

Also, when the display is none, and selectedIndex is accessed prior to making multiple = true, then it works fine.

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