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

Destroy scrollbars without scrolling to top #67

Closed
idiotWu opened this issue Apr 21, 2017 · 0 comments
Closed

Destroy scrollbars without scrolling to top #67

idiotWu opened this issue Apr 21, 2017 · 0 comments

Comments

@idiotWu
Copy link
Owner

idiotWu commented Apr 21, 2017

As is mentioned in #66, currently scrollbar scrolls to very top when scrollbar.destroy() is called (destroy.js#L52). It would be better if native scrollbar could also stay at the same offset:

// #destroy()
container.scrollTop = this.scrollTop;
container.scrollLeft = this.scrollLeft;

Also, scrollbars should preserve the same offset when it's initialized (smooth-scrollbar.js#L28):

// #init()
const { scrollTop, scrollLeft } = container;
container.scrollTop = container.scrollLeft = 0;
this.setPosition(scrollTop, scrollLeft);
@idiotWu idiotWu self-assigned this Apr 21, 2017
@idiotWu idiotWu added this to the v8.0.0 milestone Apr 21, 2017
@idiotWu idiotWu removed this from the v8.0.0 milestone Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant