Skip to content

Commit dab6947

Browse files
authored
fix(useInfiniteScroll): compatibility issues of getScrollTop in Android browsers (#269)
1 parent be54f23 commit dab6947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/hooks/src/utils/rect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const getScrollTop = (el: Document | Element) => {
2-
if (el === document || el === document.body) {
2+
if (el === document || el === document.documentElement || el === document.body) {
33
return Math.max(
44
window.pageYOffset,
55
document.documentElement.scrollTop,

0 commit comments

Comments
 (0)