Skip to content

Commit

Permalink
fix(useElementBounding): update on scroll (#2596)
Browse files Browse the repository at this point in the history
* fix: ElementBounding Scroll #2319

* Update packages/core/useElementBounding/index.ts

Co-authored-by: sibbng <sibbngheid@gmail.com>

Co-authored-by: sibbng <sibbngheid@gmail.com>
  • Loading branch information
Ducz01 and sibbng committed Dec 30, 2022
1 parent 4bbcf4b commit 268a644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useElementBounding/index.ts
Expand Up @@ -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 })

Expand Down

0 comments on commit 268a644

Please sign in to comment.