Closed
Bug 131481
Opened 24 years ago
Closed 23 years ago
Menulist with width constrained max-width and crop does not report correct size to enclosing box elements in dialogs
Categories
(Core :: XUL, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: cmanske, Assigned: bryner)
References
Details
(Keywords: regression, Whiteboard: [adt2 rtm],custrtm-)
Attachments
(4 files)
|
5.91 KB,
application/octet-stream
|
Details | |
|
971 bytes,
patch
|
cmanske
:
review+
hewitt
:
superreview+
|
Details | Diff | Splinter Review |
|
4.38 KB,
patch
|
bryner
:
review+
jag+mozilla
:
superreview+
jud
:
approval+
|
Details | Diff | Splinter Review |
|
40.31 KB,
image/gif
|
Details |
I'll attach an example of Composer's publish dialog that has both
style="max-width..." and crop attributes set.
These do constrain the width of a menulist in the 2nd of 3 rows, but the grid
uses the preferred width instead of the constrained width. The result is that
the grid width is too wide for the dialog and widgets get cutoff by the right
border of the dialog.
| Reporter | ||
Comment 1•24 years ago
|
||
Unzip this attachment into mozilla/editor/ui/dialogs/content.
Make Composer to install into chrome.
Open Composer.
Use File | Publish
Go to the Settings panel if you aren't there already
Enter in a long string (about 40 chars) for the Site Name
Be sure there's some text in the "Publish URL" input field.
Click on the "Publish" tab.
The text you typed will become the selected item in the 'Site' menulist.
It's width is constrained to only 10em, but the dialog will resize and show
chopped off widgets and missing buttons.
| Reporter | ||
Comment 2•24 years ago
|
||
This is probably not the fault of grid code.
I rewrote the Publish Dialog UI to put the menulist in a simpe hbox and it had
the same effect: the calculated width was constrained by CSS max-width style,
but the dialog resized using what the menulist width would have been if it were
not constrained ("prefered" width).
After discussion with Hewitt the problem seems to be in menulist code.
Bryner has made recent changes in menulist code, eg., nsMenuPopupFrame.cpp
Assignee: hewitt → bryner
Keywords: nsbeta1,
regression
| Reporter | ||
Comment 3•24 years ago
|
||
Changed summary
Summary: Grid sizing doesn't respect constrained width of menulist (has max-width and crop ) when sizing dialog → Menulist with width constrained max-width and crop does not report correct size to enclosing box elements in dialogs
| Reporter | ||
Comment 4•24 years ago
|
||
*** Bug 132111 has been marked as a duplicate of this bug. ***
Comment 5•24 years ago
|
||
Is this the only dialog in the product that has this problem? Is there a cheap
workaround? Couldn't we just constrain the site name length?
Whiteboard: [need info]
| Reporter | ||
Comment 6•24 years ago
|
||
I tried to do that and we had to constrain it so much that you couldn't see
enough of the name to be useful. Brade opposed this strongely.
Surely it's a fundamental problem -- widget's must report proper size to their
parents!
Comment 7•24 years ago
|
||
It may be a fundamental problem, but if it only occurs in this dialog, and the
site name is only used to populate the list, then we should consider making a
very safe trade between the current defect and having a shorter site name, which
would certainly not be an nsbeta1+ defect on its own. We have many more bugs
than we are going to be able to fix for MachV, so I need to look for workarounds
where they exist. Also, a more involved fix for this could easiliy cause
regressions that are themselves worse than this bug. Other possible workarounds
might be to constrain the width of the site popup, allow the dialog to stretch,
move or remove the New Site button, or some combination of these. Being
limited to 20-30 characters to describe a site name doesn't seem like much of a
constraint, considering we couldn't publish at all until now. cc Brade for input.
Comment 8•24 years ago
|
||
Charlie, I just discussed this with Syd, and he also thought it might be more
appropriate to workaround it for now. We should ensure that a bug remains open
for the real problem/fix.
Comment 9•24 years ago
|
||
Nav triage team: nsbeta1+, adt2 per Peter's/Syd's suggestion.
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
| Assignee | ||
Comment 10•23 years ago
|
||
I'm no longer seeing this bug on my own build or in a nightly (trunk)...
Charlie, can you confirm this?
| Reporter | ||
Comment 11•23 years ago
|
||
You probably can't see because we hacked around it by truncating all the strings
we put in the menulist. Not the correct solution :-)
| Assignee | ||
Comment 12•23 years ago
|
||
Ok, to remove the hack, would I change:
var menuitem = AppendLabelAndValueToMenulist(gDialog.SiteList,
TruncateStringAtWordEnd(name, 30, true), name);
to
var menuitem = AppendLabelAndValueToMenulist(gDialog.SiteList,
name, name);
?
| Assignee | ||
Comment 13•23 years ago
|
||
This should fix the problem.
| Reporter | ||
Comment 14•23 years ago
|
||
Comment on attachment 79528 [details] [diff] [review]
patch
Tested with case for Composer Publish dialog and it works great.
Attachment #79528 -
Flags: review+
| Reporter | ||
Comment 15•23 years ago
|
||
Comment on attachment 79528 [details] [diff] [review]
patch
r=cmanske
Comment 16•23 years ago
|
||
Comment on attachment 79528 [details] [diff] [review]
patch
sr=hewitt
Attachment #79528 -
Flags: superreview+
| Assignee | ||
Comment 17•23 years ago
|
||
checked in on the trunk. Requesting ADT approval for branch checkin.
| Reporter | ||
Comment 18•23 years ago
|
||
With above fix, we don't need any hacks in Composer. Yeah!
| Assignee | ||
Updated•23 years ago
|
Attachment #79539 -
Flags: review+
| Assignee | ||
Comment 19•23 years ago
|
||
Comment on attachment 79539 [details] [diff] [review]
Remove workarounds in Publish dialog
r=bryner
Comment 20•23 years ago
|
||
Comment on attachment 79539 [details] [diff] [review]
Remove workarounds in Publish dialog
sr=jag
Attachment #79539 -
Flags: superreview+
Comment 21•23 years ago
|
||
Please land and test on trunk. Also please attach a screen shot of the problem
before the fix.
Comment 22•23 years ago
|
||
When's this gonna land on the trunk?
Keywords: approval
Whiteboard: [adt2] → [adt2] [Needs a=]
| Assignee | ||
Comment 23•23 years ago
|
||
It already has, that's why I marked it RESOLVED/FIXED.
Comment 24•23 years ago
|
||
but, we need this screen shot for deciding if it goes in the branch. please add
one if possible, or update the bug if not so we can try some other way to
determine impact.
| Reporter | ||
Comment 25•23 years ago
|
||
Top 2 images show dialog in correct form.
Next 2 show how we control the resizing by an ugly hack that truncates the
sitename string.
Last image shows the serious basic problem: the menulist doesn't respect the
"max-width: 30em" set in the dialog XUL and the result messes up dialog layout
such that buttons aren't useable.
The fix Bryner suggests in patch 79528 is very sound and will prevent similar
problems by all menulist users. It has been working fine in the trunk -- I've
found no bad side effects.
Bryner: Will this affect sizing of HTML select elements use in web page forms?
If yes, that would be a very strong argument for fixing this basic layout
problem in the release branch.
Comment 26•23 years ago
|
||
Good work, but let's save this for rtm, marking adt2 rtm, adt1.0.0-
| Assignee | ||
Comment 27•23 years ago
|
||
This would only affect HTML select sizing if XBL form controls were being used,
which they won't be for MachV or Mozilla 1.0.
| Reporter | ||
Comment 28•23 years ago
|
||
*** Bug 143789 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 29•23 years ago
|
||
Getting dups on this already from beta build. This is important to fix for RTM.
Removed "-" so this will be evaluated for RTM checkin.
| Assignee | ||
Updated•23 years ago
|
Comment 30•23 years ago
|
||
adt1.0.1+ (on behalf ADT's behalf) for checkin to the 1.0 branch, pending
Driver's approval. Pls check this in asap.
Blocks: 143047
Comment 31•23 years ago
|
||
Adding the + in the keywords section (Jaime commented it was going to be plused
but change was not made)
Comment 32•23 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1+
Updated•23 years ago
|
Attachment #79539 -
Flags: approval+
Comment 34•23 years ago
|
||
verified101 on 0723 brnch build
Status: RESOLVED → VERIFIED
Keywords: fixed1.0.1 → verified1.0.1
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•