question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace scrollIntoView with scroll-into-view-if-needed

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
stipsancommented, Nov 12, 2017

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 😄

2reactions
stipsancommented, Nov 16, 2017

ah! Then you don’t need to wait for the animation refactor, I’ll publish an update for you soon 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found