Skip to content

Commit

Permalink
fix: Modal's mask modify the page's width #321 (#322)
Browse files Browse the repository at this point in the history
* fix: 修复Modal的蒙层修改页面宽度的问题

* fix: back

* fix: Modal's mask modify the page's width
  • Loading branch information
PengQingYao committed Jan 3, 2023
1 parent a2052f8 commit 12a535a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Dom/scrollLocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export default class ScrollLocker {
window.innerWidth - document.documentElement.clientWidth > 0) ||
container.scrollHeight > container.clientHeight
) {
scrollBarSize = getScrollBarSize();
if (getComputedStyle(container).overflow !== 'hidden') {
scrollBarSize = getScrollBarSize();
}
}

const containerClassName = container.className;
Expand Down

0 comments on commit 12a535a

Please sign in to comment.