jakeinbake
jakeinbake

Reputation: 21

Focusing on element using Ember Components

I have an element which's height expands upon hover, however the page does not scroll down when the element extends beyond the view box.

I've heard using jquery to focus on the element upon mouseEnter allows this to work properly.

Here's what I have so far:

export default Ember.Component.extend({
  mouseEnter() {
    $(this).focus();
  }
});

I've just started using Ember and am not 100% on how components work, so any information is welcome.

Upvotes: 0

Views: 56

Answers (1)

runspired
runspired

Reputation: 2693

You were almost there.

export default Ember.Component.extend({
  mouseEnter() {
    this.$().focus();
  }
});

Upvotes: 1

Related Questions