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

multiple issues when context isn't window #21

Closed
jedwards1211 opened this issue Nov 20, 2015 · 3 comments
Closed

multiple issues when context isn't window #21

jedwards1211 opened this issue Nov 20, 2015 · 3 comments

Comments

@jedwards1211
Copy link

  • scroll jumps to 0 then animates to end position (this is because window.pageYOffset is used even when context !== window
  • scroll end position is often incorrect, e.g. when context.scrollTop !== 0
  • smooth scrolling to the end doesn't ease out in some cases. Solution: clamp the end position to context.scrollHeight - context.offsetHeight

These issues are fixed in my PR #20

@powerbuoy
Copy link

I'd also like to see this fixed. As well as support for horizontal scrolling.

@dennismphil
Copy link

Tried 0.2.2 with webpack and noticed an error. My guess is, this issue is also related to not setting the context correctly in the library

Error:

/js/smoothscroll.js:27
ent.querySelectorAll === void 0 || window.pageYOffset === void 0 || history.pu
                                                                    ^
ReferenceError: history is not defined

@aabbi
Copy link

aabbi commented Jul 22, 2016

facing the same issue as @dennismphil

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

5 participants