diff --git a/src/main/resources/js/get-current-scrollX.js b/src/main/resources/js/get-current-scrollX.js index a3b46d9..12091fe 100644 --- a/src/main/resources/js/get-current-scrollX.js +++ b/src/main/resources/js/get-current-scrollX.js @@ -1 +1 @@ -return window.scrollX; \ No newline at end of file +return Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); \ No newline at end of file diff --git a/src/main/resources/js/get-current-scrollY.js b/src/main/resources/js/get-current-scrollY.js index 8efa1f6..6bcb7b1 100644 --- a/src/main/resources/js/get-current-scrollY.js +++ b/src/main/resources/js/get-current-scrollY.js @@ -1 +1 @@ -return window.scrollY; \ No newline at end of file +return Math.max(document.documentElement.scrollTop, document.body.scrollTop); \ No newline at end of file