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
Tooltip position bug when the component is on the right side #7038
Comments
Trace: yiminghe/dom-align#22 |
@benjycui Has this issue been fixed? I can reproduce this issue with the latest Ant Design. Here is a demo compared with the react-bootstrap tooltip. |
@afc163 Can you reopen this issue for easy tracking? |
I have been dealing with this issue for a few days and found that the position of the popup element is correct, while the position of the arrow is not correct. So it's not a problem with the After debugging, I found that the position of the arrow was hardcoded in the CSS file, instead of calculating dynamically based on the position of the target element and the popup element. Eventually, the position of the arrow is not flexible enough, it will break in some special situations. I tried to fix this problem on my own. The solution is that I extend the Here is the demo solution. It works well for placements In this solution, I get the target region with the OK, that's all, the solution above is just a proposal, feel free to comment if you have any question. |
#14582 |
https://github.com/yiminghe/dom-align/blob/98bcb1874f90a8725064f76449f85d9a452dba23/src/align/align.js#L159 |
我好像搞错了 不是这个问题 虽然有关联 但是关联不大 但是以后可能用更精确的相对位置判断 |
I can confirm that I'm also experiencing this issue, and that @yuezk's workaround works for me as well. Unfortunately the override is a little sub-optimal due to a lot of typing issues, namely that |
There are around 280 issues, 246 of them are marked as inactive. Good job! @ant-design-bot |
@yuezk Feel free to compare with other open source projects, we try our best. |
any update? |
Auto arrow position has been supported in antd 5.x now! #40632 See https://ant.design/components/tooltip#components-tooltip-demo-shift |
Version
2.12.3
Environment
Windows 7, Chrome 60
Reproduction link
https://codepen.io/topvis/pen/OjNxam?editors=001
Steps to reproduce
Run CodePen repo, then hover the mouse over the button.
What is expected?
The little triangle arrow on the tooltip box should still point to somewhere on the component.
What is actually happening?
The tooltip points to the wrong position. ref. to the screenshot.
The text was updated successfully, but these errors were encountered: