Reproduction link
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.
Environment | Info |
---|---|
antd | 4.20.2 |
React | 18.1.0 |
System | MacOS 12.3.1 |
Browser | Chrome 100.0.4896.127 (Official Build) (x86_64) |
4条答案
按热度按时间slsn1g291#
It works fine in your codesandbox, anything I miss?
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 将会被自动关闭。
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.
8wtpewkr4#
https://thewebdev.info/2021/04/17/how-to-check-for-text-overflow-ellipsis-in-an-html-element/ is not alway correct in some situation.