Skip to content
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

Closed
wants to merge 0 commits into from
Closed

fix: typography ellipsis wrong when browser zoomed #19661

wants to merge 0 commits into from

Conversation

liuchao233
Copy link
Contributor

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

#19219

馃挕 Background and solution

Typography.Paragraph ellipsis error when scale browser

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@netlify
Copy link

netlify bot commented Nov 10, 2019

Deploy preview for ant-design ready!

Built with commit 74082de

https://deploy-preview-19661--ant-design.netlify.com

@codecov
Copy link

codecov bot commented Nov 10, 2019

Codecov Report

Merging #19661 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 74082de...74082de. Read the comment docs.

const windowScale = window.devicePixelRatio;
ellipsisContainer.innerHTML = originEle.innerText && originEle.innerText[0] || '';

const realLineHeight = windowScale < 1 ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test case.

@@ -170,6 +178,7 @@ export default (
}

if (inRange()) {

Copy link
Member

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.

@afc163 afc163 changed the title fix typography ellipsis error fix: typography ellipsis wrong when browser zoomed Dec 17, 2019
@auto-add-label auto-add-label bot added the bug label Dec 17, 2019
@liuchao233 liuchao233 closed this Dec 21, 2019
@codesandbox-ci
Copy link

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:

Sandbox Source
antd reproduction template Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants