# 将时间轴手柄拖到末尾会跳转到页面底部，而非讨论底部

**URL:** <https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899>\
**Category:** UX\
**Created:** [2020年一月6日 18:41 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899 "2020-01-06T18:41:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2020年一月6日 18:41 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/1 "2020-01-06T18:41:00Z")

</div>

1. 当将时间轴手柄拖到末尾时，页面会跳转到页面底部。如果您的视口较短，这意味着您可能会完全跳过最后一篇帖子，直接跳转到推荐主题或页脚。

2. 相比之下，点击最后一篇帖子的日期时，您会被带到最后一篇帖子的顶部（我认为这样是合理的）

 ![Screen Shot 2020-01-06 at 1.38.04 PM](https://global.discourse-cdn.com/meta/original/3X/7/1/714fccef0c260eb6f653356e99f5d054682eece3.png)

最近已针对移动设备对此进行了调整（[https://meta.discourse.org/t/jump-to-last-post-does-not-jump-to-correct-position-and-does-not-hide-jump-tool-after-scrolling/130600），但该问题在桌面端仍然存在。](https://meta.discourse.org/t/jump-to-last-post-does-not-jump-to-correct-position-and-does-not-hide-jump-tool-after-scrolling/130600%EF%BC%89%EF%BC%8C%E4%BD%86%E8%AF%A5%E9%97%AE%E9%A2%98%E5%9C%A8%E6%A1%8C%E9%9D%A2%E7%AB%AF%E4%BB%8D%E7%84%B6%E5%AD%98%E5%9C%A8%E3%80%82)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2020年一月7日 01:29 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/2 "2020-01-07T01:29:16Z")

</div>

> [@awesomerobot](#):
>
> 拖拽到底部时，应该最终停留在最后一篇帖子的底部……在包含相关主题和推荐主题的私信中，跳转到页面底部尤其令人烦恼。

我支持这一更改，它能简化操作并保持一致性。

@martin 你能将这个更改应用到移动端和桌面端吗？（请务必在包含一篇非常非常非常长的帖子的主题上进行测试）

---

<div class="post-metadata">

**Author:** ![JimPas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimpas/32/148179_2.png) [@JimPas](https://meta.discourse.org/u/JimPas)\
**Post date:** [2020年一月7日 04:40 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/4 "2020-01-07T04:40:20Z")

</div>

在此期间，您只需 **点击** 滑块底部，即可跳转到最后一篇帖子。手动将其向下拖动确实会带您到达页面底部……即最后一篇帖子之后。

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2020年一月7日 04:43 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/5 "2020-01-07T04:43:48Z")

</div>

从另一个话题来看，似乎并不清楚当初为何要实现这个跳转到末尾的功能。那么，我是否应该直接假设它并不需要，并移除 @pmusaraj 的变通方案以及 @daniel 的原始功能？

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2020年一月7日 04:47 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/6 "2020-01-07T04:47:22Z")

</div>

> [@martin](#):
>
> 从另一个话题来看，似乎并不清楚_为什么_要实施这种跳转到末尾的功能。

主要原因在于，如果你有一个巨大的帖子，即使你拖动滚动条到底部，仍然会卡在帖子的顶部，这非常令人沮丧。

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2020年一月7日 04:48 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/7 "2020-01-07T04:48:46Z")

</div>

啊，谢谢提供额外的上下文。所以在某些情况下确实还需要它。我会把这一点考虑进去 👍

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2020年一月7日 06:21 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/8 "2020-01-07T06:21:22Z")

</div>

我在此处为此问题添加了一个修复方案。

> <https://github.com/discourse/discourse/pull/8671>
>
> Meta topic: https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end…-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899
> 
> \* When using the slider to scroll past the bottom post,
> we now scroll to the bottom of the post/page IF the
> post height is \> the window height (e.g. really long
> posts). if the post height is smaller, then we lock
> onto and jump to the top of the post
> \* This also removes the mobile hack that would always jump
> to the top of the last post on mobile
> 
> This works on both mobile and desktop. To test, try dragging the timeline handle past the end of the last post and letting go. For small height posts we jump to the top of the last posts. For large height posts we jump to the end of the post which often just shows the end of the page with the bottom of the post.
> 
> The only main concern I still have here is whether the post height \> window height rule is OK. On my laptop my window height for Chrome is ~811 so any post taller than that will make the slider jump to the end of the page. I am not sure how to make this rule more dynamic without adding arbitrary heights to the window height in the comparison or doing ranges e.g. if your window height is 800-1200 the post must be \> 1400 height to jump to end of the page etc.

请查看我的拉取请求说明。我认为它运行良好，但可能仍有改进空间，以使限制不那么严格。

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2020年一月10日 04:19 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/9 "2020-01-10T04:19:49Z")

</div>

@awesomerobot 能否确认现在是否运行得更好/符合您的预期？🙂

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2020年一月14日 20:58 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/10 "2020-01-14T20:58:56Z")

</div>

是的，现在看起来好多了。💪

---

<div class="post-metadata">

**Author:** ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
**Post date:** [2020年一月14日 22:26 UTC](https://meta.discourse.org/t/dragging-the-timeline-handle-to-the-end-brings-you-to-the-bottom-of-the-page-not-the-bottom-of-the-discussion/137899/11 "2020-01-14T22:26:17Z")

</div>


