From b1cc368da8ce1715ddaa6bc640b361505b22f1be Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 4 Apr 2018 00:56:45 +0200 Subject: [PATCH] FIX: regression where tag could not be deleted with click --- .../javascripts/select-kit/components/mini-tag-chooser.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 index c4cf6c1fecd..bc53b6ba335 100644 --- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 @@ -56,7 +56,7 @@ export default ComboBox.extend(Tags, { this.$(".select-kit-body").on("click.mini-tag-chooser", ".selected-tag", (event) => { event.stopImmediatePropagation(); - this.destroyTags($(event.target).attr("data-value")); + this.destroyTags(this.computeContentItem($(event.target).attr("data-value"))); }); this.$(".select-kit-header").on("focus.mini-tag-chooser", ".selected-name", (event) => { @@ -184,6 +184,7 @@ export default ComboBox.extend(Tags, { destroyTags(tags) { tags = Ember.makeArray(tags).map(c => get(c, "value")); + // work around usage with buffered proxy // it does not listen on array changes, similar hack already on select // TODO: FIX buffered-proxy.js to support arrays