PolymerElements / paper-dialog-scrollable

A scrollable area used in a Material Design dialog
15 stars 18 forks source link

ensure target is set on ready #29

Closed valdrinkoshi closed 8 years ago

valdrinkoshi commented 8 years ago

Fixes #13, fixes #27 by ensuring the sizing target is set on ready (since iron-overlay-behavior's method attached is called before the one of paper-dialog-scrollable), and using flex instead of fit to size the internal scrollable element. min-height, max-height is needed for a correct sizing on Firefox v 43.0.2 (mac os) and Chrome Canary v49.0.2618.0 (mac os)

Also fixes https://code.google.com/p/chromium/issues/detail?id=578183

valdrinkoshi commented 8 years ago

@cdata kindly review.

I'm not sure we should add tests for the fix on ready, since paper-dialog-behavior is the one implementing iron-fit-behavior and using sizingTarget. I'm not even sure is a duty of paper-dialog-scrollable to set the sizingTarget...WDYT?

cdata commented 8 years ago

@valdrinkoshi

paper-dialog-scrollable sized 0 if paper-dialog is created opened

"paper-dialog-scrollable has the right size if paper-dialog is created opened" seems like a good test to add. WDYT?

valdrinkoshi commented 8 years ago

@cdata good idea, added the test! PTAL

cdata commented 8 years ago

LGTM :+1: