PolymerElements / iron-fit-behavior

Fits an element into another element
17 stars 34 forks source link

Sizing does not account for scrollbars #81

Closed joshuahiggins closed 3 years ago

joshuahiggins commented 6 years ago

Description

When iron-fit-behavior determines maxWidth and maxHeight it does not accommodate scrollbar sizing on overflowing content.

Expected outcome

When there is an overflow, maxWidth and/or maxHeight should be increased to accommodate the scrollbar size.

Actual outcome

maxWidth and maxHeight are determined based on exact content size. When a scrollbar is needed, the content size is now reduced and results in wrapped text or incorrect margins.

Live Demo

https://jsbin.com/reruwuhoci/edit?output

Steps to reproduce

See live demo, and view difference between the 2 dropdown menus.

Browsers Affected