Replace scrollIntoView with scroll-into-view-if-needed
See original GitHub issueI’d like to reduce the amount of code to maintain and scrollIntoView
is probably the most complicated code in this project. Richard pointed me to scroll-into-view-if-needed
. Looks like it could be a good replacement.
Anyone want to make a PR to replace scrollIntoView
and see how it impacts the examples?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Element.scrollIntoViewIfNeeded() - Web APIs | MDN
The Element.scrollIntoViewIfNeeded() method scrolls the current element into the visible area of the browser window if it's not already within ...
Read more >html - Javascript: scrollIntoView() vs scrollIntoViewIfNeeded()
The Element.scrollIntoViewIfNeeded() method scrolls the current element into the visible area of the browser window if it's not already within ...
Read more >scroll-into-view-if-needed - npm
This is replaced with behavior: Function with one key difference. Instead of firing once per element that should be scrolled, the new API...
Read more >Element.scrollIntoViewIfNeeded() - Web APIs
scrollIntoViewIfNeeded () method scrolls the current element into the visible area of the browser window if it's not already ... scrollIntoView() method.
Read more >scrollIntoViewIfNeeded 4 everyone!!! - gists · GitHub
I've forked this gist to replace the use of scrollIntoView with direct scrollTop/Left manipulation when centerIfNeeded is false so that it will work...
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 FreeTop 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
Top GitHub Comments
Hey guys, just want to let you know that we just introduced a simpler API interface for
scroll-into-view-if-needed
. Next step is to get rid of amator and reduce bundle size as much as possible 😄ah! Then you don’t need to wait for the animation refactor, I’ll publish an update for you soon 😄