mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
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:
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user