Skip to content

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jul 19, 2023

@github-actions
Copy link

github-actions bot commented Jul 19, 2023

😭 Deploy PR Preview 4cba725 failed. Build logs

🤖 By surge-preview

useLayoutEffect(() => {
if (mergedLock) {
const scrollbarSize = getScrollBarSize();
const scrollbarSize = getTargetScrollBarSize(document.body).width;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是应该监听元素所在的 dom 容器的滚动条宽度,有可能只是局部覆盖了样式。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂时不用,目前这个 hooks 只处理 body,下面的样式锁定也是写死的 body。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and 动态锁定可以开新的 PR 作 feature

@zombieJ zombieJ merged commit f3b2e2c into master Jul 19, 2023
@delete-merged-branch delete-merged-branch bot deleted the adjust-overflow branch July 19, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Modal]: body width incorrect when customizing scrollbar width

3 participants