mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04: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 = () => {
|
this.maintainHeight = () => {
|
||||||
|
|
||||||
let height = Math.min(
|
let height = Math.min(
|
||||||
$(window).height() - this.topOffset + $('html, body').scrollTop(),
|
$(window).height() - this.topOffset + $(window).scrollTop(),
|
||||||
this.nativeHeight
|
this.nativeHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user