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

Popconfirm's arrow is not centered by using 'arrowPointAtCenter' #40167

Closed
yuehaocc opened this issue Jan 11, 2023 · 2 comments
Closed

Popconfirm's arrow is not centered by using 'arrowPointAtCenter' #40167

yuehaocc opened this issue Jan 11, 2023 · 2 comments

Comments

@yuehaocc
Copy link

yuehaocc commented Jan 11, 2023

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • click the text element
  • then you can find the Popconfirm's arrow is not center by using 'arrowPointAtCenter'

What is expected?

the Popconfirm's arrow point at the center of the target

What is actually happening?

Popconfirm's arrow is not centered by using 'arrowPointAtCenter'

Environment Info
antd 4.24.7
React react
System macOS 12.5.1
Browser 版本 108.0.5359.124(正式版本) (x86_64)
@afc163
Copy link
Member

afc163 commented Jan 11, 2023

当弹层在浏览器可见范围内时,箭头位置默认是生效的:https://codesandbox.io/s/ji-ben-antd-4-24-7-forked-xtiy6k?file=/demo.tsx

如果弹层在浏览器边缘,弹层会自动调整渲染位置尽可能在可视范围内展现以便用户能看见,这会导致箭头和元素偏离。

我们建议在浏览器边缘的 trigger,手动使用 placement 指定合适的弹层方向(在主楼的例子是 right)。

另外我们会尝试用更加智能的方式,在 autoAdjustOverflow 触发的情况下,让箭头尽可能自动指向元素。可以跟踪 #7038 (comment) 关注后续进展。

@afc163 afc163 closed this as completed Jan 11, 2023
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

2 participants