# 导航到新主题时，Discourse 在帖子历史记录中后退 20 篇帖子

**URL:** https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739
**Category:** Bug
**Created:** [2022年十月24日 01:40 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739 "2022-10-24T01:40:01Z")
**Posts on this page:** 7
**Page:** 2

<div class="post-metadata">

### Author: ![agemo](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@agemo](https://meta.discourse.org/u/agemo)
#### Post date: [2022年十二月3日 15:02 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/29 "2022-12-03T15:02:01Z")

</div>

在 Safari 上看到的 - iOS 14.x

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [2023年二月12日 08:53 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/33 "2023-02-12T08:53:10Z")

</div>

我最近在我的网站上遇到了这个问题，通常是加载时间较长的大型主题。\n\n还有其他人仍然遇到类似的问题吗？会不会是上面提交中提到的竞态条件？

---

<div class="post-metadata">

### Author: ![Sevencasper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sevencasper/32/307651_2.png) [@Sevencasper](https://meta.discourse.org/u/Sevencasper)
#### Post date: [2023年五月19日 04:39 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/34 "2023-05-19T04:39:39Z")

</div>

在一段时间内（超过 6 个月），我一直遇到这个问题以及以下问题（使用 Windows 11 和 Edge 浏览器（版本 113.0.1774.42（官方版本）（64 位））：

> [@The read post position changed in topic?](https://meta.discourse.org/t/the-read-post-position-changed-in-topic/241978/15):
>
> Hello Sam, No, after revert the commit it is good for me. The first thing I mentioned is probably not an issue arrow_down_small As Jarek said this is how it works. I think I mixed up this with the logged out topic view? When I logged out It goes to the next post rather than the last onscreen post.

> [@Bottom of topic shows "There is 1 unread remaining" when there are actually 0 unread topics remaining](https://meta.discourse.org/t/bottom-of-topic-shows-there-is-1-unread-remaining-when-there-are-actually-0-unread-topics-remaining/220817/34):
>
> I’ve [reported this before](https://meta.discourse.org/t/tracker-counts-include-deleted/216727) too, but I was pointed to this post: slightly_smiling_face

我最初以为是由于在手机和电脑之间切换造成的，但在停止使用手机访问论坛后，问题仍然存在。  
我在出现问题的论坛上发帖询问，有人建议我尝试使用其他浏览器（der）。

我已经切换到 Firefox 浏览器（版本 113.0.1 64 位），并且我在 Discourse 论坛上遇到的所有问题都已解决。

---

<div class="post-metadata">

### Author: ![AzaB2C](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/azab2c/32/323076_2.png) [@AzaB2C](https://meta.discourse.org/u/AzaB2C)
#### Post date: [2023年八月28日 20:23 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/35 "2023-08-28T20:23:40Z")

</div>

您好！我来自 [V1 Engineering Forum](https://forum.v1e.com/t/forums-everything-menu-gone-links-working-not-as-good/39626/6?u=azab2c)，我们中的几个人注意到这个/类似的意外行为变化。

预期访问以前阅读过的主题会显示上次阅读的帖子。  
实际上看到的主题比预期的早 20 帖打开。对于帖子少于 20 帖的主题，您会定位到第一帖，然后花费时间向下滚动以弄清楚哪些帖子比您上次阅读的新。

是否有管理员设置可以修复？以及/或者是否有可用的 Discourse 代码修复？

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [2023年八月28日 20:26 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/36 "2023-08-28T20:26:12Z")

</div>

这似乎是最近再次发生，并且应该很快得到修复（因为更改已经合并）  
新帖子：

> [@Topics jumping to wrong post](https://meta.discourse.org/t/topics-jumping-to-wrong-post/276305/31):
>
> Thanks so much for the clear reproduction steps @Don pray Yup, that’s it! Two things going on here at the same time Loading slider service needs to remove the still-loading class from the body LockOn needs to scroll to the right place They were both scheduled in the afterRender part of Ember’s runloop. And since the ‘lock on’ stuff is technically scheduled first, it was being run first. And so LockOn was running while all the post HTML was in the DOM, but still had display: none. …

GitHub PR：

> <https://github.com/discourse/discourse/pull/23290>
>
> When the 'loading slider' navigation indicator is enabled, and a connection is v…ery slow, we \`display: none\` most of the page and display a spinner. The \`still-loading\` body class for this was being added in the \`afterRender\` step in the Ember runloop. This meant that, depending on the order they were scheduled, other \`afterRender\` jobs may run before it. This caused an issue with topic scroll locations because we would attempt to scroll to an element which was \`display: none\` at the point its position was calculated.
> 
> This commit moves the \`still-loading\` class manipulations to the \`render\` step of the runloop, which is technically more correct, and means that anything scheduled in the \`afterRender\` step is guaranteed to run without the \`display: none\` CSS.
> 
> https://meta.discourse.org/t/276305/29

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2023年八月28日 20:48 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/37 "2023-08-28T20:48:21Z")

</div>

我们关闭这个，以支持最新的。 👍

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2023年八月28日 20:48 UTC](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739/38 "2023-08-28T20:48:25Z")

</div>



[上一頁](https://meta.discourse.org/t/discourse-jumps-back-20-posts-in-post-history-when-navigating-to-new-topic/242739.md?page=1)
