react-component / tooltip

React Tooltip
http://react-component.github.io/tooltip/
MIT License
924 stars 188 forks source link

Arrow alignment is broken after `@rc-component/trigger` update #441

Closed FlorisVeldhuizen closed 1 year ago

FlorisVeldhuizen commented 1 year ago

In the provided example of this repo, the tooltip arrow now aligns like this:

image

which is caused by this styling that is applied to <div class="rc-tooltip-arrow"></div>.

image

When this inline styling is removed, the arrow alignment looks normal again:

image image

Changes in the @rc-component/trigger have caused changes in the arrow alignment, so the problem probably lies there.

ilinalexgit commented 1 year ago

Have the same issue, it looks like arrowContent prop is ignored.

psiclopz commented 1 year ago

Same issue. The "arrowContent" prop still exists on Tooltip, but was removed from Popup, and the instance of Popup in the Tooltip was changed to omit the arrowContent prop in the 5.3.1->6.0.0 changes. https://github.com/react-component/tooltip/compare/v5.3.1...v6.0.0 Popup.tsx line 9 Tooltip.tsx line 76

zombieJ commented 1 year ago

In latest version. rc-tooltip use @rc-component/trigger arrow config instead. But yes, ignore arrowContent should be fixed.

cristian-sima commented 1 year ago

So in the end, which is the solution? I am still having the arrow in wrong position: image

FlorisVeldhuizen commented 11 months ago

So in the end, which is the solution? I am still having the arrow in wrong position: image

The issue still persists, I don't know why this was closed!

yoyo837 commented 11 months ago

So in the end, which is the solution? I am still having the arrow in wrong position: image

The issue still persists, I don't know why this was closed!

Run npm ls @rc-component/trigger to see what version it is.

k10wl commented 11 months ago

So in the end, which is the solution? I am still having the arrow in wrong position: image

The issue still persists, I don't know why this was closed!

Run npm ls @rc-component/trigger to see what version it is.

same issue, result of ls - @rc-component/trigger@1.17.0

yoyo837 commented 11 months ago

@cristian-sima @FlorisVeldhuizen @k10wl Could you provide a new reproduction link and open a new issue in antd repo?

FlorisVeldhuizen commented 11 months ago

The example page is broken (both locally and online), so no easy way to show you atm. If you are able to fix the example page you will see that the arrows still not align properly!

yoyo837 commented 11 months ago

Try this page https://react-component.github.io/tooltip/demo/arrow-content

ref: https://github.com/react-component/tooltip/pull/460

FlorisVeldhuizen commented 11 months ago

Thanks for providing the working demo page! The arrow alignment:

image

yoyo837 commented 11 months ago

@zombieJ Do we need to set the trigger's transform-origin in the tooltip to solve it?