From 268a644fa147f583cd1e39263740d85320f78bd1 Mon Sep 17 00:00:00 2001 From: Ducz01 <74987182+Ducz01@users.noreply.github.com> Date: Fri, 30 Dec 2022 18:55:13 +0100 Subject: [PATCH] fix(useElementBounding): update on scroll (#2596) * fix: ElementBounding Scroll #2319 * Update packages/core/useElementBounding/index.ts Co-authored-by: sibbng Co-authored-by: sibbng --- packages/core/useElementBounding/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/useElementBounding/index.ts b/packages/core/useElementBounding/index.ts index 28777941327..18c6c30dbdc 100644 --- a/packages/core/useElementBounding/index.ts +++ b/packages/core/useElementBounding/index.ts @@ -93,7 +93,7 @@ export function useElementBounding( watch(() => unrefElement(target), ele => !ele && update()) if (windowScroll) - useEventListener('scroll', update, { passive: true }) + useEventListener('scroll', update, { capture: true, passive: true }) if (windowResize) useEventListener('resize', update, { passive: true })