diff --git a/packages/usehooks-ts/src/useScrollLock/useScrollLock.ts b/packages/usehooks-ts/src/useScrollLock/useScrollLock.ts index 3fe58010..7b6b9d2d 100644 --- a/packages/usehooks-ts/src/useScrollLock/useScrollLock.ts +++ b/packages/usehooks-ts/src/useScrollLock/useScrollLock.ts @@ -89,7 +89,7 @@ export function useScrollLock( parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0 - const scrollbarWidth = offsetWidth - target.current.scrollWidth + const scrollbarWidth = offsetWidth - target.current.clientWidth target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px` }