New issue
Advanced search Search tips

Issue 649041 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Incorrect height of dropdown for a multiline select box containing an emoji as an option

Reported by rdevaiss...@skytap.com, Sep 21 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Steps to reproduce the problem:
1. Create a select box with size set to X and X+1 options
2. Verify only X options are visible
3. Change the list of options to X and add an option with an emoji

What is the expected behavior?
After step 3, only X options should be visible

What went wrong?
After step 3, more than X options are visible (see the attached snippet of HTML to repro the bug).

Did this work before? Yes 52.0.2743.116

Chrome version: 53.0.2785.116  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0
 
dropdown.chrome53.bug.html
345 bytes View Download
And here is the rendering issue.
dropdown.chrome53.bug.png
6.7 KB View Download

Comment 2 by shrike@chromium.org, Sep 22 2016

Components: -UI Blink>Forms>Select
Status: Untriaged (was: Unconfirmed)

Comment 3 by tkent@chromium.org, Sep 22 2016

Owner: tkent@chromium.org
Status: WontFix (was: Untriaged)
The intrinsic height of a listbox SELECT is calculated by <maximum option height> * <size attribute value>, and an emoji is taller than ASCII characters.

A workaround is to specify a fixed height to option elements.

option {
  height: 14px;
}

According to the HTML specifications, the size attribute for a select tag "Gives the number of options to show to the user". I see more options than I expect so strictly speaking the implementation is not according to specification. Now I see your point, since "an emoji is taller", you want that very logic to make sure you render 5 rows in case 5 emojis are there. Firefox has a similar issue but Safari has no problem following the spec.

Couple questions:
* Should emojis be taller than ASCII characters?
* They don't seem taller but the height of the option is (default to 18px instead of 13.1875px)
* How come was this not an issue in version 52?

Thanks very much

Comment 5 by tkent@chromium.org, Sep 26 2016

 Issue 650085  has been merged into this issue.

Sign in to add a comment