Skip to content

Conversation

@albertogasparin
Copy link

Hi Joe,
I've tweaked your code to better fit my needs, but I think my changes could interest you.

  1. I've fixed a small lag that sometimes occurs on the first scroll (because startTopScroll was undefined)
  2. I've changed the method to get the height (from offsetHeight to clientHeight).
    If the element has a border, your scroll function will do it wrong.
  3. I've added the ability to prevent the scroll if the element is smaller than the visible area.
    It is useful if you want a correct behavior in a WebView app (preventing outer page scroll).

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

Successfully merging this pull request may close these issues.

3 participants