GithubHelp home page GithubHelp logo

Comments (5)

nirav-programmer avatar nirav-programmer commented on May 25, 2024

Hi,

yall.js 3.1.1 not working iOS safari < 12.1

any solution ?

from yall.js.

radfahrer avatar radfahrer commented on May 25, 2024

We're seeing this in browsers other than Safari. It does seem to happen more often in Safari. After reading the MDN Docs I'm guessing that the images somehow get past the transition between not intersecting and intersecting without triggering the callback and then won't trigger the callback again until the image leaves the viewport. Which would explain why scrolling back over the image (usually) causes it to load.

from yall.js.

malchata avatar malchata commented on May 25, 2024

My initial thoughts on this might be that the intersection listener callback code is detaching from certain objects before they load. I'm not sure how to approach this issue, though, and would appreciate a PR to address it, because I'm very short on time at the moment.

from yall.js.

malchata avatar malchata commented on May 25, 2024

So, I've found that changing the check for entry.intersectionRatio to check instead for entry.isIntersecting seems to work better. Can you think of any reason why this would be, @radfahrer? Or if my assumption here is wrong?

from yall.js.

radfahrer avatar radfahrer commented on May 25, 2024

Looks like isIntersecting does work more reliably. My working theory is that intersectionRatio can sometimes be 0.0 which would be falsey, and then the callback doesn't fire again for that element until it scrolls out and back into the scree.

from yall.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.