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

Popover如果浮层渲染在父节点,当有滚动条时,点击打开在文档中间位置的popover时滚动条会滚动到顶部 #21918

Closed
1 task
zhangzhi93 opened this issue Mar 6, 2020 · 10 comments

Comments

@zhangzhi93
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开modal,点击Click me,滚动条会滚到顶部

What is expected?

滚动条不动

What is actually happening?

点击popover,滚动条会自动滚到顶部

Environment Info
antd 4.0.1
React 16.12
System windows10
Browser chrome80

当查看popover的信息时,因为滚动到顶部,就看不到了

@AshoneA
Copy link
Contributor

AshoneA commented Mar 6, 2020

去掉 popover props 中的 getPopupContainer={trigger => trigger.parentNode} 试试

@zhangzhi93
Copy link
Author

去掉 popover props 中的 getPopupContainer={trigger => trigger.parentNode} 试试

但是我还需要popover滚动跟随

@AshoneA
Copy link
Contributor

AshoneA commented Mar 6, 2020

Use getPopupContainer={trigger => trigger}.

@zhangzhi93
Copy link
Author

Use getPopupContainer={trigger => trigger}.

popover可以了!但是popover里面的select展示不开了,并且select我也想跟随滚动

@AshoneA
Copy link
Contributor

AshoneA commented Mar 6, 2020

对 Select 也用 getPopupContainer={trigger => trigger}.

@zhangzhi93
Copy link
Author

对 Select 也用 getPopupContainer={trigger => trigger}.

image
也是显示不开

@afc163 afc163 closed this as completed Mar 6, 2020
@zhangzhi93
Copy link
Author

@AshoneA
Copy link
Contributor

AshoneA commented Mar 6, 2020

@zhangzhi93 把 Modal 内容区域高度调高一点。

@zhangzhi93
Copy link
Author

@zhangzhi93 把 Modal 内容区域高度调高一点。

和modal高度没关系吧,我找找合适的节点放select吧,popover用getPopupContainer={trigger => trigger}是可以了

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

No branches or pull requests

3 participants