Comments (8)
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.
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.
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.
Got ya, almost done with the fix. will open a pr and up the patch version once done. 👍
from scroll-js.
Hey @thejamespower opened a PR with the fix tests to ensure this is not actually a bug: #17
from scroll-js.
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.
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.
Thanks @mkay581, I'll investigate further our end.
from scroll-js.
Related Issues (20)
- Errors with brunch HOT 6
- Container.contains is not a function HOT 2
- Offset option HOT 17
- Massive NPM package HOT 3
- Stop scrolling immediately. HOT 4
- Scroll start always from the top of the page rather than from the current position HOT 5
- Scrolling always starts at the top for Chrome and Firefox HOT 4
- other easing options HOT 3
- Support more ScrollIntoViewOptions per specification
- Remove support for instant behavior
- Holp to support `top` into ScrollIntoViewOptions HOT 1
- Behavior of `behavior` HOT 2
- Why does this package has a minimal node engine version HOT 6
- IE11 Support HOT 3
- On nextjs it runs in development mode. HOT 2
- Import error "cannot find module" HOT 5
- Feature Request: `cancel` method
- Feature Request: `scrollBy` method
- scrollIntoView not working in IE HOT 4
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-js.