Incorrect select control rendering for option and optgroup, when using display: table-cell and table-row

RESOLVED INVALID

Status

()

Core
Layout: Form Controls
RESOLVED INVALID
9 years ago
9 years ago

People

(Reporter: Alexander, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 FirePHP/0.2.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 FirePHP/0.2.1

Some white spaces added for select control. Options rendered not like table.

Reproducible: Always

Steps to Reproduce:
Use this testcase

optgroup { display: table-row } 
option { display: table-cell }

 <select>
 	<optgroup>
 		<option>1</option>
 		<option>2</option>
 	</optgroup>
 	<optgroup>
 		<option>32222</option>
 		<option>4</option>
 	</optgroup>
 </select>





This is a good way to create monthly calendar using just the select control :)
Created attachment 362384 [details]
reporter's testcase

Assuming this is what reporter means. 
It crashes Opera.
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
I have no idea what this bug report is about, exactly... the options do in fact render like a table in the dropdown (which I find to be questionable, but whatever), and the select control is behaving as it should: it's sized to the size of the first thing in the dropdown.  Which happens to be a table.

Other than disallowing changing display on options, which I'm not sure we should do, I don't think we should make any changes here.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

9 years ago
Sorry, Boris, are you sure, what option render as table cell? 
First optgroup is shorter than next one. Options have not equal width.

Select box have unexpected white space below the text, which grow with every new  optgroup.
> Sorry, Boris, are you sure, what option render as table cell? 
> First optgroup is shorter than next one. Options have not equal width.

That's not at all what I see in the dropdown.  Care to post a screenshot of what you see?

> Select box have unexpected white space below the text, which grow with every
> new  optgroup.

Yes; I mentioned that in comment 2.  I believe that's acceptable, as I said.
(Reporter)

Comment 5

9 years ago
> That's not at all what I see in the dropdown.  Care to post a screenshot of
> what you see?

Sorry, this is my mistake, I'm testing this code in FF3, not 3.2.

One other thing, optgroup create the shifting for options, I think, this is incorrect.
> Sorry, this is my mistake, I'm testing this code in FF3, not 3.2.

I tested in Fx2, Fx3, and current trunk.  Behavior looks identical.

> One other thing, optgroup create the shifting for options, I think, this is
> incorrect.

No idea what you mean here.  Screenshots of what you think is correct and incorrect behavior, maybe?  Or a clearer explanation of the problem?
(Reporter)

Comment 7

9 years ago
Created attachment 363850 [details]
Options rendering by FF3.0.6
Oh, indeed.  Fx2 and trunk behave differently; I have no idea what's up with Fx3.
You need to log in before you can comment on or make changes to this bug.