mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 17:13:44 +08:00
FIX: uses touchstart/mousedown for selected tags (#6268)
It seems to be way more reliable on firefox and safari in the case of hot replaced content not using ember.
This commit is contained in:
parent
216f4c99b0
commit
7290765a62
|
@ -48,17 +48,21 @@ export default ComboBox.extend(Tags, {
|
|||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.$(".select-kit-body").on("click", ".selected-tag", event => {
|
||||
const $button = $(event.target);
|
||||
this._destroyEvent(event);
|
||||
this.destroyTags(this.computeContentItem($button.attr("data-value")));
|
||||
});
|
||||
this.$(".select-kit-body").on(
|
||||
"mousedown touchstart",
|
||||
".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");
|
||||
this.$(".select-kit-body").off("mousedown touchstart");
|
||||
},
|
||||
|
||||
@computed("hasReachedMaximum")
|
||||
|
|
Loading…
Reference in New Issue
Block a user