Skip to content

Commit f74a68d

Browse files
authored
fix(useScroll): use configurable window's getComputedStyle (#5150)
1 parent 6f67a24 commit f74a68d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/useScroll/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export function useScroll(
210210
|| unrefElement(target as HTMLElement | SVGElement)
211211
) as Element
212212

213-
const { display, flexDirection, direction } = getComputedStyle(el)
213+
const { display, flexDirection, direction } = window.getComputedStyle(el)
214214
const directionMultipler = direction === 'rtl' ? -1 : 1
215215

216216
const scrollLeft = el.scrollLeft

0 commit comments

Comments
 (0)