From 2c90a2e5c25a0ee5090bb0d03e21e1bf3fc0c91c Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 30 Jul 2018 13:03:40 -0400 Subject: [PATCH] FIX: prevents mini-tag-chooser to catch unwanted focus --- .../select-kit/components/mini-tag-chooser.js.es6 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 3e8edebc1da..882447346d8 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 @@ -48,19 +48,15 @@ export default ComboBox.extend(Tags, { willDestroyElement() { this._super(...arguments); - $(".selected-name").off("touchend.select-kit pointerup.select-kit"); + this.$(".selected-name").off("touchend.select-kit pointerup.select-kit"); }, didInsertElement() { this._super(...arguments); - $(".selected-name").on( + this.$(".selected-name").on( "touchend.select-kit pointerup.select-kit", event => { - if (!this.get("isExpanded")) { - this.expand(event); - } - this.focusFilterOrHeader(); } );