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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typography.Paragraph刚好出现滚动条时一直闪屏 #42958

Closed
wankangk1 opened this issue Jun 12, 2023 · 9 comments · Fixed by #43058
Closed

Typography.Paragraph刚好出现滚动条时一直闪屏 #42958

wankangk1 opened this issue Jun 12, 2023 · 9 comments · Fixed by #43058
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive

Comments

@wankangk1
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

1.此为antd官网demo,将ellipsis设置成3行
2.拖动浏览器边框使demo刚好出现滚动条时,会一直闪
3.在出现滚动条的边界反复试一下

What is expected?

出现正常的滚动条,文本没有屏闪现象

What is actually happening?

文本屏闪

Environment Info
antd 4.24.10
React react17
System windows10
Browser 114.0.5735.110(正式版本)
@wankangk1
Copy link
Author

咋没人回复呢;
动画
改正一下,拖动使滚动条刚好消失出现的,目前使用overflow-y:scroll 能暂时避免,应该是滚动条消失时一行能显示的文字数量变了导致的,往下继续拖动触发重新计算了又正常了

@zombieJ zombieJ added 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed labels Jun 14, 2023
@zombieJ
Copy link
Member

zombieJ commented Jun 14, 2023

Typography 带有 expand 按钮时,省略是通过 js 计算得来。这个滚动条正好卡在有滚动条要折行,于是折行后滚动条发现又不需要了又变回去。有点不太好处理。

@bbb169

This comment was marked as outdated.

@BoyYangzai
Copy link
Contributor

@bbb169 pr 可以 reopen~

@heiyu4585 heiyu4585 added help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. and removed 👷🏻‍♂️ Someone working on it labels Jun 16, 2023
@github-actions
Copy link
Contributor

Hello @wankangk1. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @wankangk1,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

@bbb169
Copy link
Contributor

bbb169 commented Aug 28, 2023

@cloudmoonocus
Copy link

@zombieJ 请问在 "antd": "4.22.8" 里,这种问题如何解决呢,是因为 white-space: pre-line 这个,设置成不保留换行符的属性之后就没有这种情况了,有什么解决方案可以保留换行符,还不闪烁?🤔🤔

@juanporley
Copy link

juanporley commented Feb 1, 2024

If this PR (#43058) is a fix, can it be backported to antd v4? We're experiencing this flicker with v4.24.15 @bbb169 @zombieJ

@juanporley
Copy link

Issue was reported on v4 so I'm not sure why it was marked as Closed if the commit didn't make it to v4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive
Projects
None yet
7 participants