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

style(tree): fix scrollheight calculation of inline-block element #3044

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

li1615882553
Copy link
Contributor

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Component style change
  • Typescript definition change
  • Documentation change
  • Coding style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Breaking change
  • Others

Background and context

修改前
tree组件的子节点前面存在一个缩进块,这是个空白的行内元素,内部会产生"幽灵空白节点",导致树整体的scrollHeight大于clientHeight,最终在treeSelect的下拉中本不该产生滑动条的情况下产生了滑动条
image

修改后
修改行内元素的vertical-align,使scrollHeight计算正确
image

Solution

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
tree 修复scrollHeight计算异常问题 fix scrollHeight calculation exception problem

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others
    should be submitted to main branch)

Other information

Copy link

codesandbox bot commented Mar 27, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@flsion flsion added the type: 🔮 style Something about component style label Mar 29, 2024
@flsion flsion added this to the 2.55.1 milestone Mar 29, 2024
@flsion flsion merged commit f4717b6 into arco-design:main Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: 🔮 style Something about component style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants