prevent scrolling up browser behaviour
I have an interaction on my website that happens on scroll up and in Chrome on my mac when a user scrolls to the bottom of the page, it bounces up a little bit; and, this triggers the interaction causing an undesired effect.
I don't know if this is an OS X or Chrome thing.
Either way, I don't want the scrolling up to happen when the page has reached the bottom unless the user does it or code does it.
How can I prevent this browser behaviour of scrolling back up slightly when reaching the bottom of a page.
Here is what I have to knowing when the bottom of the page is reached:
if($(window).scrollTop() > $(document).height() - $(window).height())
It seems like something about OSX, i never see anything like that using chrome in windows, have you tested it in other versions? or another browser?
That's probably the "elastic" scrolling of OSX, also implemented in Chrome for OSX (Safari as well). Maybe try out this answer.