TradeMe / ng-defer-load

MIT License
127 stars 37 forks source link

Doesn't load until scroll stops iPhone #26

Open Exocomp opened 5 years ago

Exocomp commented 5 years ago

On iPhone the images don't load until the scroll stops, is there a way to set it up so that the images load as they come into view even while stills scrolling ?

mzoellner commented 4 years ago

Hi @Exocomp, this is dependent on when the event is triggered by the browser. It could be that on Safari the event isn't triggered until the scrolling has finished. That is likely an implementation detail of Safari, so there is not a lot we can do about it.

There might be a way to cause the loading event to happen sooner by using the rootMargin property of the intersection observer. This way the bounding box of the root element can be extended and the likelihood of the event firing earlier is higher.

If you want to dig into this and provide a PR, I am happy to review that and merge it in.