Closed
Bug 212845
Opened 21 years ago
Closed 19 years ago
select element width miscalculated or ignored if style property height is set
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 292656
People
(Reporter: pirtti, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Select element (may apply to others - I hanven't tested) width seems to be
miscalculated if style property height is set for that element. If the element
is placed in a table cell that has width set to 100% then this bug causes the
element (or other stuff in the cell) to exceed the right border of the cell.
Everything functions well unless select's height is set with CSS.
I've tested with 1.2a and 1.2.1 and those render both correctly, 1.4 incorrectly.
Reproducible: Always
Steps to Reproduce:
1. see page source for: http://jellona.antila.iki.fi/~pirtti/mozilla.html
2. try with browser
3.
Actual Results:
Cell contents do not fit into cell even tough width=100% is set.
Expected Results:
Widen the cell when the select element is widened.
Comment 1•21 years ago
|
||
Something do to with nowrap, I presume.
Updated•21 years ago
|
Whiteboard: DUPEME
Reporter | ||
Comment 2•21 years ago
|
||
nowrap has no effect whatsoever (I removed it from the testcase also)
the cell clearly whould be wider even thought height for the inner element was
set and it is in mozilla 1.2, ie *, opera *, etc... so I still vote this is a
bug.
Comment 3•21 years ago
|
||
I thought I had removed nowrap...
Oh, I definately agree this is a bug, but I just think it's a duplicate...
Attachment #127930 -
Attachment is obsolete: true
Updated•21 years ago
|
Comment 4•21 years ago
|
||
->Form controls
Assignee: table → form
Component: Layout: Tables → Layout: Form Controls
QA Contact: madhur → desale
Comment 5•21 years ago
|
||
Hello,
This seems to be like a bug I'm experiencing when using the Select control in
Mozilla. (My client is Mozilla 1.4 as well.) At least the effect (select box
which isn't high enough) is the same, so I thought I should add it here, instead
of submitting a new (duplicate?) bug report. If it turns out that this is a
different bug, then I apologize in advance and I hope that you will notify me.
I'm getting the bug when I create a select box with one option, and there is no
text in that option or the text is a single space. When the text is the
nbsp-entity or a letter (tried it with 'd'), then the select box is rendered
high enough. Strangely enough, when the select box is initially empty, then the
box is rendered high enough as well.
This effect still persists if I fill the select box with arbitrary values,
through JavaScript.
I'll post here the code I'm using. Just copy & paste the code (between the
[code] tags) into a text editor, save the file and open it with Mozilla. Four
textboxes will be shown, of which the second and third are too low. I expect
them to be as high as the outermost textboxes.
[code]
<html>
<head>
<script type="text/javascript">
<!--
function fillSel()
{
fillSel2(document.getElementById("sel0"));
fillSel2(document.getElementById("sel1"));
fillSel2(document.getElementById("sel2"));
fillSel2(document.getElementById("sel3"));
return;
}
function fillSel2(sel)
{
sel.options.length = 0;
sel.options[0] = new Option("select 1", "sel1", false, false);
sel.options[1] = new Option("select 2", "sel2", false, false);
sel.options[2] = new Option("select 3", "sel3", false, false);
}
//-->
</script>
</head>
<body onload="fillSel()">
<select id="sel0"></select><!-- good -->
<select id="sel1"><option value="dummy"></option></select><!-- too low -->
<select id="sel2"><option value="dummy"> </option></select><!-- too low -->
<select id="sel3"><option value="dummy"> </option></select><!-- good -->
</body>
</html>
[/code]
Kind regards,
Frank Steggink
Comment 6•21 years ago
|
||
I need to add something;
In my case I'm not mentioning the width of the select element. Nor do I do
anything with CSS. In the example page the first thing I noticed was that the
height of the second select element is too low (and its width too wide). That
made me think my problem is related.
Frank
Comment 7•19 years ago
|
||
*** This bug has been marked as a duplicate of 292656 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•