Feature request: scrollTo
See original GitHub issueAny chance you will add scrollTo
functionality? Or there is more appropriate library for this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Feature request: scrollTo with alignToTop - v6 - CodeMirror
In order to restore the user's scroll position when they re-open a document, we'd like to be able to scroll a stored line...
Read more >[FEATURE REQUEST] ScrollTo specific index. #196 - GitHub
In my case, I want to use dynamic index everyTime so i cannot use scrollTo function because it takes static count. Is there...
Read more >feature request for scroll to top : r/BoostForReddit
In portrait mode (the way basically all smartphones operate), pressing the Home icon in the bottom row scrolls to the top. I like...
Read more >Feature request: Scroll to Top Only on Categories / Tags
One big request, a way to have the scroll to top appear only specific posts within specific categories or tags. Thanks in advance....
Read more >Feature Request: Scroll To Me
Hello. This is what I hope is a pretty simple request, @zep. Currently if you click PLAY on any Pico-8 project included in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Huh, this is something new. Haven’t seen
Element.scrollIntoView()
.Well they share some functionality - measuring position of elements.
But I have no strong preference. Will try suggested solutions. Thanks a lot
UPD:
For future googlers there is
Element.scrollIntoView()
andElement.scrollIntoViewIfNeeded()
see caniuseUPD 2:
Solution looks like this, inspired by http://blog.vjeux.com/2013/javascript/scroll-position-with-react.html
Yep, if you need smooth scrolling, I’d go with
Element.scrollIntoView()
and a polyfill. I know some folks at Airbnb have set that up and I haven’t heard of any issues with it.https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
airbnb-browser-shims brings in smoothscroll-polyfill
👍