Closed Bug 16675 Opened 26 years ago Closed 26 years ago

Select element doesn't resize after setting contents until mouse rollover

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 16362

People

(Reporter: cmanske, Assigned: rods)

Details

When using the select element for a combobox or list in a XUL UI file, we often need to fill the list (i.e., add option tags) at runtime via JavaScript. When we do that, the layout of the widget doesn't resize correctly according to the new content. Test case is to launch the editor (from Apprunner task menu or with -edit on the commandline): Click in a document to locate the caret NOT inside an existing table. Click on the "Table" toolbar button -- the Insert Table dialog appears. Move mouse over the combobox to the right of the "Table Width" editfield. The combobox widens because an item was added during dialog startup with the string "% of window". Another case showing problem in a list: Locate caret as above in the editor test document. Click on the "Link" toolbar button -- the Link Properties dialog appears. The list near the bottom contains headings and named anchors. Note that it has scrollbars. Move the mouse over the list and it changes size and the scrollbars are removed. This may be tricky -- you may have to move mouse around, including over different elements of the scrollbar (the arrows and/or the "thumb") until this change is triggered. Note that calling window.sizeToContent() after filling a list or combobox does not change this behavior. Maybe the solution is to trigger recalculation of the widget size when this method is called? (We have to do this anyway since the changes to the select widget size requires relaying out of the dialog.) David: Does this sound like a good idea?
After further research, this is probably a dup of 16317 or 16362 (which is supposed to be fixed.) I'm updating my tree now to be sure I got the fix for 16362.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 16362 ***
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.