Open Bug 1271482 Opened 9 years ago Updated 3 years ago

"display: inline-block" (or inline[-whatever]) on long list of <option>s makes their <select> container super-wide

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

Tracking Status
firefox49 --- affected

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(1 file)

Attached file testcase 1
STR: 1. Load attached testcase. EXPECTED RESULTS: Dropdown menu should be about as wide as its widest option. ACTUAL RESULTS: Dropdown menu is extremely wide -- multiple viewport-widths wide. (It seems to be as wide as all of its options lined up side to side). The key thing here is: > option { display: inline-block } ...which apparently makes us do the wrong thing when computing the intrinsic width of the <select>. This was originally reported at https://github.com/webcompat/web-bugs/issues/2541#issuecomment-218017490 for a dropdown on the front of https://offshoreleaks.icij.org/ I'm using Nightly 49.0a1 (2016-05-08)
Summary: "display: inline-block" on <option> makes its <select> container super-wide → "display: inline-block" on long list of <option>s makes their <select> container super-wide
I can also reproduce this in Nightly 12.0a1 (2012-01-01) (from over 4 years ago), so this is not a regression (or not a recent one, at least).
(The bug happens for any inline-flavored display value, BTW -- I tried "inline", "inline-flex", "inline-table" -- same results. None of these actually put the <option> elements on a single line, but the <select> element seems to compute its intrinsic width *as if* they did.)
Summary: "display: inline-block" on long list of <option>s makes their <select> container super-wide → "display: inline-block" (or inline[-whatever]) on long list of <option>s makes their <select> container super-wide
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: