PolymerElements / iron-fit-behavior

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

Wrong positioning when embedding in a flex container #17

Closed timeu closed 8 years ago

timeu commented 9 years ago

When putting a paper-dialog and a paper-dialog-scrollable' inside a body that has the classesfullbleed,verticalandlayout`, the offset will be wrong.

Reproducable: https://jsbin.com/dizison/edit?html,output If you remove the layout and vertical classes from the body tag it will work fine.

The problem is that this line will result in a negative offset: https://github.com/PolymerElements/iron-fit-behavior/blob/master/iron-fit-behavior.html#L229

cdata commented 8 years ago

I'm sorry, but the reported issue is a little too vague to be actionable. Can you provide screenshots of the expected result and the actual result from your test case, and then re-open? Thanks!

timeu commented 8 years ago

It seems that the issue isn't reproducable anymore.

Soem more infos: When I created the issue, the problem was, that the dialog was bigger than the visible screen because var sizingOffset = this[offsetExtent] - this.sizingTarget[offsetExtent]; returned a negative value (when the body was flexed) and thus maxHeight was bigger than it should be.