Change method of getting scrollTop

The current method reports `0` in Safari, whatever
the scroll position.

Some testing across our browser matrix shows:
1. this is also the case on IOS
2. browsers in the matrix all support
   `$(window).scrollTop()`

https://scroll-position-test-page.glitch.me/#results

This changes the method to use
`$(window).scrollTop()` instead.
This commit is contained in:
Tom Byers
2019-12-03 13:27:48 +00:00
committed by Leo Hemsted
parent da414beab9
commit 6b0b0dd263
+1 -1
View File
@@ -65,7 +65,7 @@
this.maintainHeight = () => {
let height = Math.min(
$(window).height() - this.topOffset + $('html, body').scrollTop(),
$(window).height() - this.topOffset + $(window).scrollTop(),
this.nativeHeight
);