# Using backspace in search (when adding new tags) removes existing tags from topic

**URL:** https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699
**Category:** Bug
**Created:** [April 3, 2020, 1:24pm UTC](https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699 "2020-04-03T13:24:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![imagejan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/imagejan/32/119672_2.png) [@imagejan](https://meta.discourse.org/u/imagejan)
#### Post date: [April 3, 2020, 1:24pm UTC](https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699/1 "2020-04-03T13:24:34Z")

</div>

Hi all,

when trying to add tags to an existing topic, it often happens to me that I accidentally delete tags from that topic, just because I want to correct a typo when searching for the tag name.

It seems that the first time hitting ⟵ Backspace will delete the last typed letter, but then the latest tag is highlighted, and when you press ⟵ Backspace again, that tag gets removed. I find that behavior rather annoying.

Is anyone else seeing this as well?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [April 3, 2020, 1:28pm UTC](https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699/3 "2020-04-03T13:28:27Z")

</div>

Yes agreed I should tweak this, will make this happen only if input is empty.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [April 3, 2020, 2:28pm UTC](https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699/4 "2020-04-03T14:28:13Z")

</div>

That will do it:

[https://github.com/discourse/discourse/commit/883901e4c0bc293463d15fdcacde1c80707ca2cb](https://github.com/discourse/discourse/commit/883901e4c0bc293463d15fdcacde1c80707ca2cb)

Thanks.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [April 3, 2020, 2:28pm UTC](https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699/5 "2020-04-03T14:28:16Z")

</div>


