Closed
Description
Reduced test case
I created a reduced test case that showcases this behavior on CodePen:
- Debug mode (use this to test, if available)
- Full page view
- Code view
Steps to reproduce the issue
Different Browsers produce different results.
Chrome & Edge:
- Open a new tab. Be sure your cache is disabled (Devtools > Network > Disable Cache).
- Bug will not be visible on repeat visits / cached images.
- Visit the debug mode or full page view from above.
- Click an image to open the Lightbox.
- Click the "X" to close the image / Lightbox.
- Click the same image to open it again.
Safari:
- Open a new tab. Be sure your cache is disabled (Devtools > Network > Disable Cache).
- Bug will not be visible on repeat visits / cached images.
- Visit the debug mode or full page view from above.
- Click an image to open the Lightbox.
Results
Chrome & Edge:
The image is invisible when you open it the second time.
Safari:
The image is invisible in the Lightbox upon first click / fresh cache. The image does show if you click to open it again.
It appears the image is indeed in the DOM when it's "invisible"; however, inline styles are setting the width
and height
to 0
, which causes the image to be invisible.
Expected results
The image(s) should display when you click to open it.
Environment
- OSX Ventura 13.4.1
- Chrome & Edge 114, Safari 16.5.1. Seems to work in Firefox!