material icon indicating copy to clipboard operation
material copied to clipboard

md-dialog height calculated wrong if page is scrolled

Open Lander opened this issue 11 years ago • 5 comments

For some reason dialog's max-height depends on md-backdrop height, which is calculated based on parent (in my case body) height. If you open dialog from a not scrolled page, it will scale fine, but if you scroll the page, the dialog will still try to take 80% of md-backdrop. The way md-backdrop height calculated right now is the following: if parent has position fixed, then we are taking body height and adding body top to account the scrolled part. That leads to wrong measure of body height and wrong dialog scale.

Example here: http://codepen.io/anon/pen/YXgbee

Lander avatar Aug 11 '15 23:08 Lander

@rschmukler

jelbourn avatar Aug 11 '15 23:08 jelbourn

+1

clalag avatar Sep 07 '15 11:09 clalag

+1

leonn avatar Sep 10 '15 13:09 leonn

+1

lbortoli avatar Sep 14 '15 17:09 lbortoli

+1

pedrovazquez779 avatar Sep 14 '15 17:09 pedrovazquez779