naver / egjs-infinitegrid

A module used to arrange card elements including content infinitely on a grid layout.
https://naver.github.io/egjs-infinitegrid/
MIT License
2.23k stars 95 forks source link

JustifiedLayout Improper Render in Chrome, but fine in Safari #390

Closed sbarer closed 3 years ago

sbarer commented 3 years ago

Description

My JustifiedLayout Component in my reactJS page is not displaying correctly in chrome. I can confirm that it works properly in Safari. The only reason I can even see all the images in chrome is because in debugging, I set a minWidth & minHeight. If I remove that CSS styling, only the first and last image are visible, and they take up the full width of the page.

Chrome:

Screen Shot 2021-02-10 at 1 03 38 PM

My Code:

Screen Shot 2021-02-10 at 1 04 08 PM

Safari:

Screen Shot 2021-02-10 at 1 03 46 PM

Any guidance would be greatly appreciated!

sbarer commented 3 years ago

I found that the issue was due to lazy loading the images, without setting their sizes explicitly. Not sure why this only affects chrome tho.