# 修复：当首个帖子未加载时，保留帖子投票的移动端布局

**URL:** <https://meta.discourse.org/t/fix-preserve-post-voting-mobile-layout-when-the-first-post-is-not-loaded/414503>\
**Category:** Bug\
**Tags:** post-voting\
**Created:** [2026 年10 月 12 日 12:21 UTC](https://meta.discourse.org/t/fix-preserve-post-voting-mobile-layout-when-the-first-post-is-not-loaded/414503 "2026-10-12T12:21:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/579066_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2026 年10 月 12 日 12:21 UTC](https://meta.discourse.org/t/fix-preserve-post-voting-mobile-layout-when-the-first-post-is-not-loaded/414503/1 "2026-10-12T12:21:20Z")

</div>

当访问投票主题下的帖子时，如果第一个帖子未加载（例如 `/t/topic/2/10`），插件的样式会加载失败，导致在移动视图下投票按钮与帖子文本重叠。

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/d/3/dd3232a1aff9b6d9f6ab9765bdf29a9823d7e4c3.png)

此提交将连接器从 `topic-above-posts-stream` 更改为 `topic-above-posts`，以便样式能够正常加载。

此外，还添加了一些规范以防止回归。

> <https://github.com/discourse/discourse/pull/44481>
>
> When visiting a post under a post-voting topic, and the first post is not loaded…, say, \`/t/topic/2/10\`, the style of the plugin failed to load, causing the voting button to overlap with the post text in mobile view.
> 
> \<img width="510" height="220" alt="image" src="https://github.com/user-attachments/assets/0b59e64c-3047-4032-af8d-613b9196999f" /\>
> 
> This commit change the connector to \`topic-above-posts\` instead of \`topic-above-posts-stream\`, so that the style is loaded normally.
> 
> Also added some spec to avoid regression.
