Comments (11)
Thanks for the fast turnaround! It works! ^_^
from scroll-into-view-if-needed.
Hey there!
Are you talking about smooth-scroll-into-view-if-needed
?
from scroll-into-view-if-needed.
@stipsan Yes, that's what I'm using.
from scroll-into-view-if-needed.
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.
I just released v1.1.13 with a fix, let me know if it works 😄
from scroll-into-view-if-needed.
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.
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.
Alright, good news! 😄👍
from scroll-into-view-if-needed.
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.
Good catch! I'll take care of it right after scroll-into-view/compute-scroll-into-view#17 😄
from scroll-into-view-if-needed.
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)
- [BUG] Safari on macOS Monterey 12.3.1
- "Cannot use import statement outside a module" error when using v2.2.31 HOT 1
- Dealing with a Fixed Navbar HOT 2
- "export 'default' (imported as 'compute') was not found in 'compute-scroll-into-view' HOT 1
- t.scroll is not a function HOT 1
- [TS] typedoc TS1479 error HOT 8
- scrollIntoView does not work anymore for element in shadow dom
- something is wrong with the [email protected] project HOT 11
- scroll position error with `display: none;` element HOT 1
- Add an options to skip in document check or pass a new `document`
- Body behind the modal scrolls HOT 1
- Snaps instead of scrolling smoothly. HOT 2
- Unneeded scrolling of ancestors HOT 1
- how to know when scrolling is complete?
- Does not scroll to element in iframe outside viewport HOT 2
- How can I combine behavior function and behavior smooth
- Shadow DOM support? HOT 2
- Dependency Dashboard
- Scroll horizontally only inside a specific div HOT 1
- Horizontal RTL scrolling goes wrong way HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll-into-view-if-needed.