Open Bug 467932 Opened 12 years ago Updated 10 years ago

Listcell's in Listbox are not automatically resized when window is resized


(Core :: XUL, defect)

Windows XP
Not set




(Reporter: morac, Unassigned)



(Keywords: regression, testcase)


(1 file)

1.01 KB, application/vnd.mozilla.xul+xml
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081203 Shiretoko/3.1b3pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081203 Shiretoko/3.1b3pre

If there is a listbox displaying a multiple listheaders and multiple list cells and the window is resized making the width smaller, the listcells do not resize with the window.  If the width is made larger, the listcells do resize with the window.  The listheaders resize whether the width is made larger or smaller.

This bug appears to have been introduced in the 1.9 branch since the problem does not occur in Firefox

Reproducible: Always

Steps to Reproduce:
1. Create a listbox with a listhead and multiple listitems.  There should also be multiple listcols.  Set a flex value on the listcols.
2. Resize the window to make the width smaller 

Actual Results:  
Listcell's in the listitems do not resize, but the listheaders in the listhead do resize.

Expected Results:  
All elements in the listbox should resize with the window like they do in Firefox
Attached file Bug 467932 example
Open this up in a window and then make the window width smaller.  The list head will update, but the listitems will not update until the user selects one of the listitems.  At that point the listcell widths will update.

The widths will automatically update when the window width is made wider, but not when the width is made smaller.
This is a regression from Bug 300030.
Keywords: regression
Version: unspecified → Trunk
I found a work around.  The lisbox focus needs to changed to trigger the redraw, so if the listbox is focuses issue a blur() on it, if it is not focused issue a focus() on it.  This can be triggered in the window onresize event.  It's a hack since the listcells appear "jumpy" on a resize, but it works.
Ever confirmed: true
Keywords: testcase
I can still reproduce this in the latest nightly.
You need to log in before you can comment on or make changes to this bug.