body-scroll-lock icon indicating copy to clipboard operation
body-scroll-lock copied to clipboard

fix: added missing CSS unit when positioning the window offset to `top`

Open emeraldsanto opened this issue 2 years ago • 1 comments

Description

This PR simply adds the missing px unit to the calculation of how much to offset from top. Without this, certain browsers will simply interpret the value as 0 which makes the page scroll to the top.

emeraldsanto avatar May 05 '22 16:05 emeraldsanto

On mobile iOS it does not attach top property on body element. This causes the scroll is not returned back to its previous position after scroll is enabled.

topolanekmartin avatar Jun 16 '22 10:06 topolanekmartin