angular-ui / angular-ui/ui-scroll

Plugin acts weirdly when list items feature CSS transition

未关闭
#41 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
326
派生
104
PR 合并指标
30 天内没有已合并 PR

描述

I ran into a weird issue where the list to be scrolled started to _jump_ around crazily when new data was loaded (See here: https://github.com/parklab/refinery-platform/issues/852) and I figured out that this was caused by the following styling on list items:

```
li {
transition: height 0.2s ease;
}
```

It makes sense in a way as JS probably relies on the immediate application of the adjusted height of the first pseudo list item. A simple fix would be to disable transitions on that pseudo list item via JS since element styles can't be overwritten by CSS.

**CSS Fix:**

```
li {
transition: all 0.2s ease;
}
li:first-child {
transition: none !important;
}
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。