Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select element sizing should ignore optgroup labels #4502

Open
heycam opened this issue Apr 3, 2019 · 2 comments
Open

select element sizing should ignore optgroup labels #4502

heycam opened this issue Apr 3, 2019 · 2 comments
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: forms topic: rendering

Comments

@heycam
Copy link
Contributor

heycam commented Apr 3, 2019

Testing shows that the label of an optgroup does not contribute to the intrinsic size of a select element, in Chrome and Safari. For example:

<select>
  <optgroup label="Some long label that has no effect.">
    <option>First</option>
    <option>Second</option>
  </optgroup>
</select>

In Firefox the select element is wide enough to fit the optgroup label, and in Chrome and Safari it is wide enough to fit "Second".

This is a Web compatibility issue for us: https://bugzilla.mozilla.org/show_bug.cgi?id=1526855

@annevk
Copy link
Member

annevk commented Apr 5, 2019

See also #4481.

@zcorpan zcorpan added the compat Standard is not web compatible or proprietary feature needs standardizing label Apr 6, 2019
@zcorpan
Copy link
Member

zcorpan commented Aug 11, 2022

The optgroup label should be ignored when computing the width of a drop-down select, but not for a listbox select.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: forms topic: rendering
Development

No branches or pull requests

3 participants