FIX: do not attempt to deselect tags if filter is not empty (#9345)

FIX: do not attempt to deselect tags if filter is not empty (#9345)

diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
index d8c63c9..bf11e81 100644
--- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
+++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js
@@ -188,7 +188,9 @@ export default ComboBox.extend(TagsMixin, {
     const value = makeArray(this.value);
 
     if (event.keyCode === 8) {
-      this._onBackspace(this.value, this.highlightedTag);
+      if (!this.selectKit.filter) {
+        this._onBackspace(this.value, this.highlightedTag);
+      }
     } else if (event.keyCode === 37) {
       if (this.highlightedTag) {
         const index = value.indexOf(this.highlightedTag);

GitHub sha: 883901e4

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/using-backspace-in-search-when-adding-new-tags-removes-existing-tags-from-topic/146699/4

This commit appears in #9345 which was merged by jjaffeux.