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.
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.
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”