Skip to content

Commit

Permalink
Merge pull request #174 from Jbcampbe/ember-mouseenter-deprecation
Browse files Browse the repository at this point in the history
bind context to fix error
  • Loading branch information
dgavey authored Sep 10, 2020
2 parents d2c908a + cce8600 commit 27ed574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/components/draggable-object-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ export default Component.extend(Droppable, {

didInsertElement() {
this._super(...arguments);
this.element.addEventListener('mouseenter', this.handleMouseEnter);
this.element.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
},

willDestroyElement() {
this._super(...arguments);
this.element.removeEventListener('mouseenter', this.handleMouseEnter);
this.element.removeEventListener('mouseenter', this.handleMouseEnter.bind(this));
},

actions: {
Expand Down

0 comments on commit 27ed574

Please sign in to comment.