# Unexpected behaviour of cursor when editing an image into a post

**URL:** https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680
**Category:** Bug
**Created:** [2016 年7 月 23 日 11:47 UTC](https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680 "2016-07-23T11:47:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### 作者： ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### 发布日期： [2016 年7 月 23 日 11:47 UTC](https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680/1 "2016-07-23T11:47:09Z")

</div>

Steps to reproduce:

Create a post of a couple of paragraphs or more.

Return to edit the post, and include an image in the middle of it.

Expected behaviour: after the image has uploaded, the cursor should be at the end of the image, ready to continue the edit.

Actual behaviour: the cursor has jumped to the end of the post.

It happens whether the image is uploaded using the editor upload button, or drag-and-drop.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2016 年7 月 23 日 20:19 UTC](https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680/2 "2016-07-23T20:19:43Z")

</div>

Sure @eviltrout can you add this to your list?

---

<div class="post-metadata">

### 作者： ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### 发布日期： [2016 年7 月 25 日 19:32 UTC](https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680/3 "2016-07-25T19:32:51Z")

</div>

Good catch. Here’s a fix:

[https://github.com/discourse/discourse/commit/3200d836f70a4233c3d7b8ed7605ba1d2720d314](https://github.com/discourse/discourse/commit/3200d836f70a4233c3d7b8ed7605ba1d2720d314)

---

<div class="post-metadata">

### 作者： ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### 发布日期： [2016 年7 月 25 日 19:32 UTC](https://meta.discourse.org/t/unexpected-behaviour-of-cursor-when-editing-an-image-into-a-post/47680/4 "2016-07-25T19:32:55Z")

</div>


