ant-design Ellipsis is not considered if the container has exactly the same width as the text

bvjveswy  于 2022-11-19  发布在  其他
关注(0)|答案(4)|浏览(156)

Steps to reproduce

Create a container and add a text. Measure the pixel width of the text and set container to the same width.

What is expected?

As a user I expect a tooltip in any case an ellipsis is shown.

What is actually happening?

When container width and text pixel width are exactly the same an ellipsis is shown but no tooltip is added.

EnvironmentInfo
antd4.20.2
React18.1.0
SystemMacOS 12.3.1
BrowserChrome 100.0.4896.127 (Official Build) (x86_64)
slsn1g29

slsn1g291#

It works fine in your codesandbox, anything I miss?

2w2cym1i

2w2cym1i2#

Hello @andrbmgi. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @andrbmgi, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。

6ss1mwsb

6ss1mwsb3#

Here is how it looks for me. We had a bug report for this for our application:

Interesting. Could you measure (in a screenshot utility) how wide the test text is?

The parent container must be exactly as wide as the rendered text for this bug to manifest.

相关问题