I want the scrollbar to move upward gently if user opens modal. I'm able to do that if I use min-height:100%;
in my <body>
tag but unable if I use height:100%
. I want to do this with height:100%
in the <body>
. Can I do this?
Basically, window.scrollY
, window.pageYOffset
are giving correct values if I use min-height:100%
but giving incorrect value i.e. 0
if I use height:100%
. Anyone know how can I use height:100%
and value window.pageYOffset
together?