Horizon
Horizon

Reputation: 131

mouseEnter and mouseLeave not working on ember?

I have a pretty simple component. Basically when I hover over it I want it to set the 'showTooltip' property based on the component to true, and when I hover off, I set it back to false. For whatever reason this doesn't seem to be working, and for the foggiest cannot figure out why (seeing as I have a click event on there too and that works fine as well). I'm runnimg Ember 2.8.

mouseEnter() {
 this.set('showTooltip', true);
 return false;
},

mouseLeave() {
 this.set('showTooltip', false);
 return false;
}

Upvotes: 1

Views: 1430

Answers (1)

ykaragol
ykaragol

Reputation: 6221

Here is a twiddle for you. It is working on 2.8.

You should care about some situations:

  • event handlers are not written in "actions" hash.
  • component must not be a "tagless" component. (Don't override tagName with undefined/null)

If you provide a twiddle, we may look further.

Upvotes: 2

Related Questions