# Inserting an HR in the editor should scroll the viewport to the new cursor position

**URL:** https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011
**Category:** Feature
**Created:** [2015 年 3 月 5 日午前 8:24 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011 "2015-03-05T08:24:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015 年 3 月 5 日午前 8:24 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/1 "2015-03-05T08:24:46Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/d/7/d7eb95f4cdfe41e312284e34a882fb0dd842aa30.gif)

**UPDATE** : The text field’s viewport is not being scrolled to include the new cursor position.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015 年 3 月 5 日午前 8:26 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/2 "2015-03-05T08:26:17Z")

</div>

It does for me in Chrome – I click the insert HR toolbar button (the line) and the cursor moves under the line.

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015 年 3 月 5 日午前 8:36 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/3 "2015-03-05T08:36:17Z")

</div>

I’m on Chrome 40 too, albeit on Windows.

Sanity check #1: the attachment is an animated GIF that shows the problem.

Sanity check #2: the cursor needs to be on the last line of the editor.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [2015 年 3 月 5 日午前 11:38 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/4 "2015-03-05T11:38:11Z")

</div>

Oh, slight distinction:

The cursor _is_ being placed below the inserted `---` line, but the text field’s viewport is _not_ being scrolled to include the new cursor position…

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015 年 10 月 2 日午後 10:53 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/5 "2015-10-02T22:53:15Z")

</div>

Wish I could edit the topic title but don’t have permissions, so:

**Clarification** : the viewport is not scrolled when an HR is inserted _on the last line_ of a scrollable post

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2025 年 12 月 4 日午前 11:35 UTC](https://meta.discourse.org/t/inserting-an-hr-in-the-editor-should-scroll-the-viewport-to-the-new-cursor-position/26011/6 "2025-12-04T11:35:45Z")

</div>


