Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't load until scroll stops iPhone #26

Open
Exocomp opened this issue Feb 19, 2019 · 1 comment
Open

Doesn't load until scroll stops iPhone #26

Exocomp opened this issue Feb 19, 2019 · 1 comment

Comments

@Exocomp
Copy link

Exocomp commented Feb 19, 2019

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants