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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: typography ellipsis wrong when browser zoomed #19661
Conversation
Deploy preview for ant-design ready! Built with commit 74082de |
Codecov Report
@@ Coverage Diff @@
## master #19661 +/- ##
=======================================
Coverage 97.81% 97.81%
=======================================
Files 286 286
Lines 7737 7737
Branches 2176 2176
=======================================
Hits 7568 7568
Misses 169 169 Continue to review full report at Codecov.
|
components/typography/util.tsx
Outdated
const windowScale = window.devicePixelRatio; | ||
ellipsisContainer.innerHTML = originEle.innerText && originEle.innerText[0] || ''; | ||
|
||
const realLineHeight = windowScale < 1 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test case.
components/typography/util.tsx
Outdated
@@ -170,6 +178,7 @@ export default ( | |||
} | |||
|
|||
if (inRange()) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add this line.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 74082de:
|
馃 This is a ...
馃敆 Related issue link
#19219
馃挕 Background and solution
Typography.Paragraph ellipsis error when scale browser
馃摑 Changelog
鈽戯笍 Self Check before Merge