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

View File

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