# 为移动端 topic-post 设置了最小高度的内联样式

**URL:** https://meta.discourse.org/t/inline-styles-of-minimal-height-declared-for-topic-post-on-mobile/272566
**Category:** Development
**Created:** [2023 年7 月 23 日 19:06 UTC](https://meta.discourse.org/t/inline-styles-of-minimal-height-declared-for-topic-post-on-mobile/272566 "2023-07-23T19:06:38Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### 作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### 发布日期： [2023 年7 月 25 日 15:47 UTC](https://meta.discourse.org/t/inline-styles-of-minimal-height-declared-for-topic-post-on-mobile/272566/2 "2023-07-25T15:47:25Z")

</div>

~~我在 Discourse 中默认看不到这些计算……是某个主题或组件添加了它们吗？~~

啊，我明白了，当加载更多回复（并移除其他回复）时，它们会被添加到较长的主题中。

看起来当帖子在滚动时被隐藏时，我们会添加最小高度，所以我想我们是为了在内容从页面移除时防止滚动位置发生变化？

> [@Infinite scroll - is discourse recycling dom elements?](https://meta.discourse.org/t/infinite-scroll-is-discourse-recycling-dom-elements/211069/4?u=awesomerobot):
>
> No we leave them around, we have a “cloaking” piece of logic that replaces elements with a placeholder once you are very far from the viewport, then when you get closer to the element we uncloak by re-rendering. The threshold for this magic is quite high.

---

_[View the full topic](https://meta.discourse.org/t/inline-styles-of-minimal-height-declared-for-topic-post-on-mobile/272566)._
