Empty, sized, select elements resize when options are added

Confirmed Issue #8701875 • Assigned to Rossen A.


David J.
Aug 30, 2016
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

If you start with an empty select element with the size attribute set and then dynamically add option elements, the rendered size of the select element changes.

See: https://jsfiddle.net/ycmwawv7/

With the default values for font size, the height of a 5 row select box in Edge is 68.65 px. When at least one option element is added, the height changes to 87px. The option elements have a height of 16px with 1px of bottom padding.

If we apply the function rowHeight = (h - 2px) / rows to both of those values we get 13.33px and 17px (or 16px less the 1px of padding).

13.33px is the default font size in Edge for the select element.
13.33px x 1.2 = 16px.

To me it seems like Edge is calculating the initial height by using only font-size but when an option is added the height is calculated based on a line-height value and padding.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Bogdan B.”

      Changed Assigned To from “Bogdan B.” to “Rossen A.”

      Changed Status to “Confirmed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in