TanStackT
TanStack7mo ago
1 reply
conventional-black

Mocking getBoundingClientRect broken

Hi folks,

since this PR https://github.com/TanStack/virtual/pull/986 mocking getBoundingClientRect for tests (e.g. using JSDOM in vitest) is broken. Do you have any suggestion how to replace it?

All the best,
theMattCode
GitHub
Problem
When using the measureElement function in combination with scaled elements (via CSS transform: scale(...)), the getBoundingClientRect() method returns fractional values that may cause layou...
Was this page helpful?