Open Bug 343964 Opened 18 years ago Updated 2 years ago

auto-sized window cuts off multi-line XUL description

Categories

(Core :: XUL, defect)

defect

Tracking

()

People

(Reporter: raceronline, Unassigned)

Details

Attachments

(3 files)

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.
Attached file description window height testcase (deleted) —
To manually open the window, use window.openDialog
Attachment #228545 - Attachment mime type: application/vnd.mozilla.xul+xml → text/plain
The following bug was created the 8th of July in 2006 but was never confirmed... https://bugzilla.mozilla.org/show_bug.cgi?id=343964 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.
Attached file Broken preference window (deleted) —
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");
Attachment #228545 - Attachment mime type: text/plain → application/vnd.mozilla.xul+xml
Attachment #277609 - Attachment mime type: text/html → application/vnd.mozilla.xul+xml
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
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: