GithubHelp home page GithubHelp logo

Duration: 0? about scroll-js HOT 8 CLOSED

markcellus avatar markcellus commented on June 1, 2024
Duration: 0?

from scroll-js.

Comments (8)

markcellus avatar markcellus commented on June 1, 2024

why not just change the Element.scrollTop property or use Element.scrollIntoView?

FWIW, the original goal of this package was to fill gaps in the spec in regards to scrolling elements--not necessarily to provide functionality that is already supported.

FYI, depending on the browsers you need to support, a lot of what this package does (i.e. scroll(), scrollTo()), are already natively supported by evergreen browsers. Animations are a part of that spec also.

from scroll-js.

markcellus avatar markcellus commented on June 1, 2024

After reviewing code though, it wouldn't hurt to implement a fix for this situation. Specifying a 0 duration should work. I'll submit a fix in a bit for it.

from scroll-js.

thejamespower avatar thejamespower commented on June 1, 2024

We were using this library as a cross-browser solution, as we prefer to abstract non-standard (Internet Explorer) code out so it doesn't 'clutter' our code. We are using this library for across several UI components and it's all working well for us, was just a little stumped as to why zero duration didn't work. Thanks for the fix though.

from scroll-js.

markcellus avatar markcellus commented on June 1, 2024

Got ya, almost done with the fix. will open a pr and up the patch version once done. 👍

from scroll-js.

markcellus avatar markcellus commented on June 1, 2024

Hey @thejamespower opened a PR with the fix tests to ensure this is not actually a bug: #17

from scroll-js.

markcellus avatar markcellus commented on June 1, 2024

Hey @thejamespower to clarify, there is really no fix for this because I tested passing duration:0 and it actually works. Not sure why it's not working for you. Do you mind pasting an example of your use case?

from scroll-js.

markcellus avatar markcellus commented on June 1, 2024

going to close this since I could not reproduce. if you're still having problems, feel free to comment in this thread.

from scroll-js.

thejamespower avatar thejamespower commented on June 1, 2024

Thanks @mkay581, I'll investigate further our end.

from scroll-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.