We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd5b49a commit 1ec5a57Copy full SHA for 1ec5a57
1 file changed
packages/virtual-core/src/index.ts
@@ -251,11 +251,8 @@ export const measureElement = <TItemElement extends Element>(
251
return size
252
}
253
254
- return Math.round(
255
- element.getBoundingClientRect()[
256
- instance.options.horizontal ? 'width' : 'height'
257
- ],
258
- )
+
+ return (element as unknown as HTMLElement)[instance.options.horizontal ? 'offsetWidth' : 'offsetHeight']
259
260
261
export const windowScroll = <T extends Window>(
0 commit comments