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.

Allow to smooth scroll any element, not only OverlayScrollbars instance

See original GitHub issue

Hi!

We already have the instance.scroll() method, but what if we want to scroll smoothly any scrollable HTML element, not necessarily customized with OverlayScrollbars?

Sure, we have native element.scrollTo({top: 100, behavior: 'smooth'}), but it doesn’t allow us to controll scroll duration (it differs depending on scroll distance).

There are also other packages which allow us to do this. But since we use OverlayScrollbars and it already can do this, it would be great to have this function out-of-the-box.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
plashenkovcommented, Aug 30, 2022

Hi, @andron13! Yes, with the help of additional scroll-smooth package. But it would be nice OverlayScrollbars had this.

1reaction
KingSoracommented, Aug 30, 2022

@plashenkov @andron13 I’ll add the scroll function as an instance function and also as an static function in version2. I plan on releasing it end of september

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow to smooth scroll any element, not only OverlayScrollbars ...
Hi! We already have the instance.scroll() method, but what if we want to scroll smoothly any scrollable HTML element, not necessarily customized with ......
Read more >
Issues · KingSora/OverlayScrollbars - GitHub
A javascript scrollbar plugin that hides native scrollbars, provides custom styleable overlay scrollbars and keeps the native functionality and feeling.
Read more >
Downsides of Smooth Scrolling - CSS-Tricks
Perhaps the largest downside of smooth scrolling is the potential to mismanage focus. Scrolling to an element in JavaScript is fine, so long...
Read more >
ngx-scrollbar - npm
The [smoothScroll] directive allows you to scroll the host element smoothly using the scroll functions that works on cross-browser. Since v3.0.0 ...
Read more >
Mac's overlay scrollbars can't be styled without reverting to ...
Here's an example: http://jsfiddle.net/leo/ht82ozhw/embedded/result/ Even if your OS' setting is to only show them while scrolling, they will be shown the ...
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