auto-sized window cuts off multi-line XUL description




13 years ago
5 years ago


(Reporter: raceronline, Unassigned)



Firefox Tracking Flags

(Not tracked)



(3 attachments)



13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060626 BonEcho/2.0a3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060626 BonEcho/2.0a3

If the height of a <description> object is more than one line, then an automatically sized window will not be tall enough to display the entire description text. This is most obvious inside <prefwindow> but is also present elsewhere. I'll attach a testcase later.

Reproducible: Always

Steps to Reproduce:
1. Create a XUL window with a <description> object in it that happens to span multiple lines.
2. Make the window containing it be dynamically sized vertically.
3. Specify a max-width for the description.
4. Open the window
Actual Results:  
The vertical height of the window is not big enough.

Expected Results:  
The vertical height of the window accommodates the full height of the description.

There is a workaround that includes manually setting the min-height of the window. However, this can be unpredictable as users with different font/size settings than the developer may have a different number of lines for the description text. The more text in the description field, the more unpredictable the results will be.

A simplified <prefwindow> testcase will be attached below.

Comment 1

13 years ago
To manually open the window, use window.openDialog


13 years ago
Attachment #228545 - Attachment mime type: application/vnd.mozilla.xul+xml → text/plain

Comment 2

12 years ago
The following bug was created the 8th of July in 2006 but was never confirmed...   

Although it was considered as "minor" by Aaron, I think that this problem is particularly annoying since it makes impossible to use a XUL description field in an auto-sized window.

I know that you have a lot of work to consider all the reported bugs, so sorry to ask you that. But do you think that someone could take in charge this bug, or change its severity to "normal" ?
The steps to reproduce it are very well explained.
I can confirm this is an issue. It's been a pain to work around in my extension since I can't hard code width/height because I put a locale text string inside the description which can vary in size depending on the language.

There appears to be a way to work around it, but it isn't pretty.
Basically you have to set a parent of the descriptions style.height javascript obj to it's computed style height.  For some reason this works.

This attachment is the one that is broken.
Same window except I added the following code in the onload attribute:

document.getElementById("tabbox").style.height=document.defaultView.getComputedStyle(document.getElementById("tabbox"), null).getPropertyValue("height");


12 years ago
Attachment #228545 - Attachment mime type: text/plain → application/vnd.mozilla.xul+xml


12 years ago
Attachment #277609 - Attachment mime type: text/html → application/vnd.mozilla.xul+xml

Comment 5

12 years ago
The second testcase shows the bug when opened in a new tab and the window is narrow enough: the groupbox and the tabpanel are cut off.
Blocks: 393945
Severity: minor → normal
Ever confirmed: true


11 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.