Giter VIP home page Giter VIP logo

Comments (5)

anilanar avatar anilanar commented on June 13, 2024 1

@aFarkas You are right, I assumed scroll was preventable, apparently it's only touch and wheel events. However if you don't mind, that bomb is more than welcome.

Even then, it's not a misunderstanding on my part. It was due to partially missing knowledge.

from stickybits.

aFarkas avatar aFarkas commented on June 13, 2024 1

Thx, @anilanar. I just answered this stackoverflow question which I found after looking how many people are using this technique.

Checkout the rAF part. Because you are using the non useful pattern there too. (It's also related to this one).

By the way you need to update getBoundingClientRect from time to time otherwise it can't react to other layout change like scripted widgets that influences height of the document or window resize...

from stickybits.

yowainwright avatar yowainwright commented on June 13, 2024

@anilanar, I did not know about the passive property but the pr looks 👌! I will look shortly 🙏

from stickybits.

aFarkas avatar aFarkas commented on June 13, 2024

Using the passive event option for the scroll event doesn't make much sense. If used in conjunction with scroll event it only shows some basic misunderstanding of the devs writing the code.

happy to drop some knowledge bombs about scroll, passive and stuff if you want.

from stickybits.

yowainwright avatar yowainwright commented on June 13, 2024

@aFarkas thanks for your insights. 🤓

from stickybits.

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.