Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switchScrollingEffect.js 中的isBodyOverflowing方法,在下面一种场景中有点欠缺: #69

Open
shaodahong opened this issue Jan 6, 2020 · 1 comment · May be fixed by #70
Assignees

Comments

@shaodahong
Copy link
Member

switchScrollingEffect.js 中的isBodyOverflowing方法,在下面一种场景中有点欠缺:

  在全局的body的样式上增加了overflow-y:scroll,至于为什么要加,原因是想解决左侧菜单栏切换,右侧对应的内容有无溢出不会出现页面抖动的问题。
  例如:https://preview.pro.ant.design/dashboard/analysis
  从分析页面到异常页403,右侧内容就会因为滚动条的原因抖动。

  如果把这个样式设置到html 上,虽然没上述问题,但是在结合弹框Modal 使用时,就会出现弹框的遮罩层遮不住滚动条,也有点不合适。

  在上面这种场景下,isBodyOverflowing期望是被返回true 的。

Originally posted by @yangdongMC in #65 (comment)

@shaodahong shaodahong self-assigned this Jan 6, 2020
@miroku-y
Copy link

大佬,请问这个方法什么时候修改呢?如下,就可以解决
function isBodyOverflowing() {
   return (document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth)||window.getComputedStyle(document.body,null).overflowY=='scroll';
}

@shaodahong shaodahong linked a pull request Jan 20, 2020 that will close this issue
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 a pull request may close this issue.

2 participants