electerious / basicLightbox

The lightest lightbox ever made.
https://basiclightbox.electerious.com
MIT License
564 stars 55 forks source link

Height 100vh is too tall on iOS Safari #27

Open ArianeNubee opened 5 years ago

ArianeNubee commented 5 years ago

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.

electerious commented 5 years ago

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!

milanidavide commented 4 years ago

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