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

**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 年1 月 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:** 1\
**Showing post:** 8

<div class="post-metadata">

作者： ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)\
发布日期： [2020 年1 月 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.

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

---

_[View the full 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)._
