react-lazyload icon indicating copy to clipboard operation
react-lazyload copied to clipboard

Lazy loading is not working if container has 'overflow-x: hidden' style

Open igoralemasow opened this issue 6 years ago • 10 comments

Hi guys, I have container with the following styles: height: 100%; position:relative; overflow: auto; overflow-x: hidden;

LazyLoad component is configured with overflow={true} property. But Lazy loading is not working.

I assume this issue is related with overflowRegex.test(overflowX) condition here

Could you please check if this condition isn't superfluous. Thank you!

igoralemasow avatar Nov 15 '17 14:11 igoralemasow

I'm having the same issue, I cannot make the hidden components load when scrolling onto them with overflow-x: hidden.

khanglu avatar Mar 20 '18 04:03 khanglu

@jasonslyvia same issue, is there a trick?

borisrorsvort avatar Jun 20 '18 12:06 borisrorsvort

Same happens to me when I use overflow-x: auto.

chaddjohnson avatar Jun 26 '18 20:06 chaddjohnson

also if container view is display: flex...

nickhingston avatar Oct 01 '18 08:10 nickhingston

ohhh man... this issue is still not resolved? Having the same problem with display: flex on the container.

alex-lechner avatar Jun 27 '19 20:06 alex-lechner

:(

DavidLozzi avatar Sep 18 '19 19:09 DavidLozzi

Don't use flex use grid instead. The issue with flex and even floating your elements is that Element.getBoundingClientRect() does not provide an accurate top value. This is an issue with Chrome not this library which relies on that value to determine if the element is within the viewport.

micahblu avatar Sep 23 '19 16:09 micahblu

Thank you. I have the same problem.

15573138624 avatar Nov 04 '19 06:11 15573138624

I am having the same issue and the issue is happening in Chrome, Firefox and Safari. So this doesn't seem to be browser issue to me. @igoralemasow did you find any solution?

atulgpt avatar Feb 12 '21 12:02 atulgpt

the issue is there even with the native lazy load (loading="lazy")

digiage avatar May 05 '21 06:05 digiage