[Webkit-unassigned] [Bug 76801] Listboxes incorrectly display contents when cleared and then re-populated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 26 00:34:54 PST 2012


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





--- Comment #5 from Joe Thomas <joethomas at motorola.com>  2012-01-26 00:34:54 PST ---
(In reply to comment #4)
> This can likely be verified with a pixel test, or better yet, a reftest.
> 
> For a reftest, one provides two HTML files, one of which uses a different way to achieve an identical look.

Thanks Alexey! I am trying to verify it with reftest.

But I am not able to reproduce the original problem with the script I have written. The test is given below. 

I tried document.getElementById("myList").selectedIndex = 99, to move to the bottom of the list with 100 elements. This does move to the bottom, but after I clear and repopulate the content, the issue described in the bug is not seen. I think I need to scroll to the bottom of the list without doing a selection as there is no selection involved in the original steps to reproduce the issue.

<!DOCTYPE>
<html>
<body onload="test()">
<select id="myList" size="10" multiple></select>
<script>
function populate()
{
    var myList = document.getElementById("myList"),
        item,
        ii;

    for (ii = 0; ii < 100; ii++) {
        item = document.createElement("option");
        item.value = ii;
        item.appendChild(document.createTextNode("Item #" + ii));
        myList.appendChild(item);
    }
}
function clear()
{
    var myList = document.getElementById("myList"),
        items = myList.getElementsByTagName("option"),
        ii;

    for (ii = items.length-1; ii >= 0; ii--) {
        myList.removeChild(items[ii]);
    }
}
function test()
{
    populate();
    document.getElementById("myList").selectedIndex = 99;
    clear();
    populate();
}
</script>
</body>
</html>

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