-
Notifications
You must be signed in to change notification settings - Fork 25
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
Auto-scroll only cares about window/body scroll #9
Comments
this is what i was initially trying to achieve... I wrote the code to handle it all (main functions are down here for reference) , but I ended up messing too much with scrolling and thought it might not worth the extra code and calculations (you rarely see scrollable divs on modern websites).
|
Yeah, it's tough. Even if this was implemented, I assume doing scrollHeight, etc. checks up the DOM tree is too expensive so I guess the best thing would be to pass an array of elements or selectors (and their axes) to scroll.
Ha, yeah. But as a user, I couldn't even plug this hypothetical library in if it existed, because there's no |
It should scroll the nearest ancestor with a scrollbar on the given axis. I say "on the given axis" because you could have a situation where the parent is horizontally scrollable but the grandparent is vertically scrollable.
The text was updated successfully, but these errors were encountered: