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

When the Popover component is contained in a fixed container, its positioning is wrong #7582

Closed
buxuku opened this issue Sep 13, 2017 · 2 comments

Comments

@buxuku
Copy link

buxuku commented Sep 13, 2017

Version

2.13.1

Environment

Ubuntu,Chrome

Reproduction link

https://codepen.io/anon/pen/wrvNYg?&editors=001

Steps to reproduce

What is expected?

the Popover will do work in a container that with the style of fixed

What is actually happening?

In this case it's doing badly

@afc163
Copy link
Member

afc163 commented Sep 13, 2017

https://github.com/ant-design/ant-design/wiki/FAQ#select-dropdown-datepicker-timepicker-popover-popconfirm-will-scroll-with-page

#3487

#3438


Please read documentation & FAQ and search issues before open an issue, THX!

@afc163 afc163 closed this as completed Sep 13, 2017
@shivakantshukla55
Copy link

shivakantshukla55 commented Feb 19, 2021

Use <Select getPopupContainer={trigger => trigger.parentElement}> to render a component inside the scroll area. If you need to config this globally in your application, try <ConfigProvider getPopupContainer={trigger => trigger.parentElement}>

And make sure that parentElement is position: relative or position: absolute.

Reference:
https://ant.design/docs/react/faq
https://codesandbox.io/s/4j168r7jw0?file=/index.js

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