Fixes #5312: Lightbox will not reposition itself on small viewport devices