From dd3435290b1309b2c1da2d2c993fcb7d09e50e6e Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Fri, 16 Sep 2022 14:24:57 -0600 Subject: [PATCH] fix: useRect scroll --- src/hooks/useRect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useRect.ts b/src/hooks/useRect.ts index aabbd021..a2649a0d 100644 --- a/src/hooks/useRect.ts +++ b/src/hooks/useRect.ts @@ -37,7 +37,7 @@ export default function useRect( rerender() } - document.addEventListener('scroll', cb) + document.addEventListener('scroll', cb, true) return () => { document.removeEventListener('scroll', cb)