Closed
Bug 649970
Opened 13 years ago
Closed 13 years ago
max-height and min-height is not working at all for select (even if height is working)
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: brunoaiss, Unassigned)
Details
Attachments
(1 file)
4.85 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 The CSS properties max-height and min-height are not being rendered by firefox when applied to select boxes. This works in firefox 3.5.* and 3.6.* but is not working in firefox 4.0. Reproducible: Always Steps to Reproduce: 1. Prepare an HTML page 2. Write CSS code to create a max-width, a min-width and overflow:scroll for the selectbox 3. See what happens. _______________ 1. Prepare an HTML page 2. Write CSS code to create a max-width, a min-width and overflow:scroll for the selectbox 3. Prepare javascript code to add and remove options from the selectbox at will 4. See what happens as you add and remove options. Actual Results: The selectbox has always the same size no matter how many options it has and if I add how many times I add or remove options Expected Results: The selectbox should adapt to the size given from the smallest size to the biggest size like firefox 3.6.16 does. It starts with the size given in min-height and increase size as I add options until it reaches the maximum size I gave it. Then add (if didn't already had) a scroll bar to the left to allow scrolling the options I'm using the safe-mode to check what I am writting.
Comment 1•13 years ago
|
||
Please upload a testcase that demonstrates the problem. Thanks. (use the "Add an attachment" link on this bug report)
Component: Style System (CSS) → Layout: Form Controls
Keywords: testcase-wanted
QA Contact: style-system → layout.form-controls
Comment 2•13 years ago
|
||
Yeah, I can't reproduce this.
You've got the the file. Please see if you have the problem too.
Comment 4•13 years ago
|
||
What file are you talking about, exactly?
Here is an example of the problem working. This works in firefox 3.6.16 as expected and it does not work in firefox 4.0 (in safe mode)
Comment 8•13 years ago
|
||
Oh, I see what you're talking about. Your styles require that the height be between 40px and 100px. Any layout within those constraints is correct. The intrinsic height of a <select> used to depend on the number of options in Firefox 3.6, but this violated the HTML5 spec for <select>, which is very clear: If the multiple attribute is present, then the size attribute's default value is 4. which means that a <select multiple> with no 'size' set must act the same as if you set size="4". So the intrinsic height must be the same as if size="4" is set. So what you see in Firefox 4 is the behavior the spec calls for.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
I see... Firefox 4 follows the html5 specification even in HTML4.01. I just consulted and tried to find and reread, etc... the html4 strict specification (corresponds to the doctype I used) and it seems like that the HTML5 behavior does not violate the html4 specification either... So having the HTML5 behavior for HTML4 is valid. So... How can I accomplish this using CSS? Now I have no ideas...
Comment 10•13 years ago
|
||
For what it's worth, we only have one HTML mode (modulo quirks mode, of course). I'm not sure there's a good way to get the old behavior without changing the "size" attribute to match the count of the options in your script. But doing that ought to work.
Updated•9 years ago
|
Keywords: testcase-wanted
You need to log in
before you can comment on or make changes to this bug.
Description
•