Open Bug 429302 Opened 12 years ago Updated 3 years ago
Select changes width when option has padding: 0px
See testcase, I would think that both select elements would have the same widths, but they don't. This regressed between 2007-05-03 and 2007-05-05: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-05-03+04&maxdate=2007-05-05+07&cvsroot=%2Fcvsroot Regression from bug 364510?
Hmm. So by default, options have 8px of padding. The display area has 4px of padding. So normally, the display area can't be wider than an option with the same text (unless the author does some careful font styling, of course, in which case all bets are off). In this case, though, the display area is 4px + text length, so it can be wider than the widest option. What we used to do was cut off part of the text, basically. We no longer do that, with the change from bug 364510. I bet you could get a similar effect with negative margins on <option> without changing the padding. The obvious options here (no pun intended) are to leave things as-is, to disallow changing <option> padding, to introduce 4px of spacing in <option>s that can't be turned off, or to somehow change the intrinsic width algorithm to take each option text, add the display frame padding, and max over those, not just the current text of the display frame. That still wouldn't solve the font-size thing, of course. My gut instinct here is to do nothing, to be honest.
Just a fyi, I found this bug on some site where it was causing a widening of a table column, so this doesn't come completely out of the blue.
See Also: → 1149481
Duplicate of this bug: 1149481
Duplicate of this bug: 1217820
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.