electerious / basicLightbox

The lightest lightbox ever made.

Home Page:https://basiclightbox.electerious.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Height 100vh is too tall on iOS Safari

ArianeNubee opened this issue · comments

On iOS Safari, if the two navigation bars are shown, 100vh is actually taller than the screen area available. So if you make a scrollable popup, it won't be possible to scroll down far enough to see all of the content.

In my site, just setting .basicLightbox's height to 100% instead seems to fix it.

There was a reason why I've used 100vh, but I can't remember why :-/ 100% seems to work fine. I will do some further tests to see if there're problems. Thanks for the tip!

I ran into the same issue, you could just do:

.basicLightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  ...
}

without specifying width and height