On iOS Safari overlay doesn't cover all of the screen's height because of height: 100svh
style
#433
Closed
1 of 4 tasks
height: 100svh
style
#433
Issue Type
Description
On iOS Safari when you start scrolling a page, the bottom menu bar disappears, and the top location bar reduces its height. When that happens and I tap on an image to zoom it, the white overlay under the zoomed image doesn't cover all of the screen's height, and I can see the page's content at the bottom.
If I remove
height: 100svh;
style from https://github.com/rpearce/react-medium-image-zoom/blob/main/source/styles.css#L60C3-L60C17, the issue goes away (Safari just uses the still remainingheight: 100vh;
).It seems like in the described case,
100svh
is equal to the viewport's height with both the bottom menu bar and the full-height top location bar present. So, when the bars are hidden or reduce their height,100svh
doesn't represent the full height of the viewport anymore.Is there a particular reason why
height: 100svh
is used in the styles?The text was updated successfully, but these errors were encountered: