Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to smooth scroll any element, not only OverlayScrollbars instance #445

Open
plashenkov opened this issue Jun 1, 2022 · 6 comments

Comments

@plashenkov
Copy link

plashenkov commented Jun 1, 2022

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.

@andron13
Copy link

Hi. Were you able to solve the smooth scrolling issue?

@KingSora
Copy link
Owner

@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

@plashenkov
Copy link
Author

plashenkov commented Aug 30, 2022

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

@plashenkov
Copy link
Author

@KingSora Great!

@plashenkov
Copy link
Author

@KingSora Could you consider adding horizontal smooth scroll as well? Even scroll-smooth cannot do that, AFAIK.

@andron13
Copy link

@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

Hi, could i ask? have you done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants