Coder Social home page Coder Social logo

Comments (11)

matthew-dean avatar matthew-dean commented on July 23, 2024 1

Thanks for the fast turnaround! It works! ^_^

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

Hey there!

Are you talking about smooth-scroll-into-view-if-needed?

from scroll-into-view-if-needed.

matthew-dean avatar matthew-dean commented on July 23, 2024

@stipsan Yes, that's what I'm using.

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

Alright. Then it's for sure a bug. It's always returning a Promise.all:
https://github.com/stipsan/smooth-scroll-into-view-if-needed/blob/c8aa5a2d23541c8f24921f0196ece43843c58f0d/src/index.ts#L111-L125

If scrollMode: 'if-needed' is breaking the behavior it sounds like it's returning something other than an empty array. Gonna check it out, thanks for the report! 😄

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

I just released v1.1.13 with a fix, let me know if it works 😄

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

I'm open for feedback on what is returned when the promise resolved. It might make sense to include the same array of actions that it's mapping through?

from scroll-into-view-if-needed.

matthew-dean avatar matthew-dean commented on July 23, 2024

What it passes to the then() function is irrelevant for me. I just need to know when the Promise resolved.

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

Alright, good news! 😄👍

from scroll-into-view-if-needed.

matthew-dean avatar matthew-dean commented on July 23, 2024

One thing that I'm seeing now. Although now an element that doesn't need scrolling returns a promise, it only resolves after the timeout, even though no scrolling happened. I would expect that if no scrolling needs to happen, then it resolves immediately.

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

Good catch! I'll take care of it right after scroll-into-view/compute-scroll-into-view#17 😄

from scroll-into-view-if-needed.

stipsan avatar stipsan commented on July 23, 2024

I made a repro here: codepen.io/stipsan/pen/gjwWXV

It is showing a behavior similar to what you mentioned above 🤔

from scroll-into-view-if-needed.

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.