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-08-15 12:23:21 +01:00
committed by Leo Hemsted
parent da414beab9
commit 6b0b0dd263

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
);