PolymerElements / iron-fit-behavior

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

Badly sized dialog, some strange interaction with padding-top #19

Closed atotic closed 9 years ago

atotic commented 9 years ago

See http://jsbin.com/roqube/edit?html,output

Observed: As you size window up and down, the size of the dialog changes. Sometimes it'll display just one line, sometimes 2, sometimes 3. Expected: Dialog should show all 3 lines.

Started tracing throught the code, it got tricky....

screen shot 2015-08-18 at 11 33 45 am

padster commented 9 years ago

Is it the same as this? https://github.com/PolymerElements/iron-fit-behavior/issues/20

I fixed mine by moving the block: if (!this._fitInfo.positionedBy.vertically || !this._fitInfo.positionedBy.horizontally) { // need position:fixed to center this.style.position = 'fixed'; } up into the start of constrain()

atotic commented 9 years ago

No longer reproducible on master.