FIX: since Ember 3 interceptClick was not working on buffered links (#6898)

This commit is contained in:
Joffrey JAFFEUX 2019-01-18 11:01:19 +01:00 committed by GitHub
parent ee7ab3e2ec
commit b20ad9d684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -75,7 +75,14 @@ export default Ember.Component.extend({
this.$(".drop a").on("click", () => { this.$(".drop a").on("click", () => {
this.$(".drop").hide(); this.$(".drop").hide();
this.set("expanded", false);
Ember.run.next(() => {
if (!this.element || this.isDestroying || this.isDestroyed) {
return;
}
this.set("expanded", false);
});
return true; return true;
}); });