FIX: ember click event not reliably working on fx (#6256)

This commit is contained in:
Joffrey JAFFEUX 2018-08-09 22:41:35 +02:00 committed by GitHub
parent d77dccc636
commit 6a2ca60b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -45,15 +45,20 @@ export default ComboBox.extend(Tags, {
); );
}, },
click(event) { didInsertElement() {
if (event.target.tagName === "BUTTON") { this._super(...arguments);
const $button = $(event.target);
if ($button.hasClass("selected-tag")) { this.$(".select-kit-body").on("click", ".selected-tag", event => {
const $button = $(event.target);
this._destroyEvent(event); this._destroyEvent(event);
this.destroyTags(this.computeContentItem($button.attr("data-value"))); this.destroyTags(this.computeContentItem($button.attr("data-value")));
} });
} },
willDestroyElement() {
this._super(...arguments);
this.$(".select-kit-body").off("click");
}, },
@computed("hasReachedMaximum") @computed("hasReachedMaximum")