mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 17:33:37 +08:00
FIX: ember click event not reliably working on fx (#6256)
This commit is contained in:
parent
d77dccc636
commit
6a2ca60b48
|
@ -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._destroyEvent(event);
|
||||
this.destroyTags(this.computeContentItem($button.attr("data-value")));
|
||||
}
|
||||
}
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user