XUL ListBox items not visible in list (off bottom) when selected do not highlight.

RESOLVED DUPLICATE of bug 326445

Status

()

Toolkit
XUL Widgets
RESOLVED DUPLICATE of bug 326445
12 years ago
11 years ago

People

(Reporter: mark.winney, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

I am coding a plugin with a dialog that contains a ListBox with 6 items, only 5 of which are visible as I have set rows to 5.
When I am adding items to the ListBox (via javascript) I am selecting some of these.  When I select the last item (not visible item) and I scroll down to see the selection it is not hightlighted and also will not highlight, eventhough the java code shows that it is actually selected.  Basically any selected item that is not visible in the list no longer highlights.

Reproducible: Always

Steps to Reproduce:
// XUL ListBox of the form below:

<listbox id="sample-page-postdata-list" seltype="multiple" disabled="true" rows="5">
	<listhead>
		<listheader label="Key"/>
		<listheader label="Value"/>
	</listhead>
	<listcols>
		<listcol/>
		<listcol flex="1"/>
	</listcols>
</listbox>

// JAVASCRIPT CODE BELOW
// get list box element from dialog.

var postDataList = document.getElementById("sample-page-postdata-list");

// Create a list of 6 rows.

for (var i = 0; i < 6; i++)
{
	var name = i;
	var val = "value"+i;

        var listCell = document.createElement("listcell");
        var listItem = document.createElement("listitem");
        
        listCell.setAttribute("label", name);
	listItem.appendChild(listCell);
	
	listCell = document.createElement("listcell");

        listCell.setAttribute("label", val);
	listItem.appendChild(listCell);

	postDataList.appendChild(listItem);
}

// Now select the last row

var item = postDataList.getItemAtIndex(5);
postDataList.toggleItemSelection(item);


Actual Results:  
Last row does not highlight anymore.

Expected Results:  
Last row can be highlighted.
Toolkit > XUL Widgets
Component: Extension/Theme Manager → XUL Widgets
Product: Firefox → Toolkit
QA Contact: extension.manager → xul.widgets

Updated

11 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 326445
You need to log in before you can comment on or make changes to this bug.