diff --git a/packages/core/useScrollLock/index.ts b/packages/core/useScrollLock/index.ts index e45af6ac315..27088bcd323 100644 --- a/packages/core/useScrollLock/index.ts +++ b/packages/core/useScrollLock/index.ts @@ -9,8 +9,8 @@ function checkOverflowScroll(ele: Element): boolean { if (style.overflowX === 'scroll' || style.overflowY === 'scroll') { return true } else if ( - style.overflowX === 'auto' && ele.elementHeight < ele.scrollHeight || - style.overflowY === 'auto' && ele.elementWidth < ele.scrollWidth + (style.overflowX === 'auto' && ele.elementHeight < ele.scrollHeight) || + (style.overflowY === 'auto' && ele.elementWidth < ele.scrollWidth) ) { return true }