igordanchenko/yet-another-react-lightbox

next/image and responsiveness

igordanchenko opened this issue ยท 3 comments

Discussed in #84

Originally posted by jensober March 9, 2023

I'm using the lightbox with the next/image component as described here: https://yet-another-react-lightbox.com/examples/nextjs

I get problems when I change the size of the browser window or rotate the smartphone. Here you can see a screen capture:

LightboxNextjsResponsive

Is there anything I can fix here?

As a workaround, I use window.screen.availWidth resp. window.screen.availHeight instead of the rect parameter to calculate the width and the height.

Thank you for catching this nasty bug! I'll release a fix later today.

๐ŸŽ‰ This issue has been resolved in version 2.6.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€