You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm somewhat hesitant to bake this in without other changes to event dispatching to make it more "pay as you go". I believe that most applications don't use mouseenter / mouseleave / mouseover and always listening to them has non-trivial cost.
A couple "simple" (I know, not always simple) work arounds for folks suffering from this right now:
Refactor your component to explicitly add an event listener in didInsertElement:
Hm, in what way would that get baked in? If we can change the implementation to be more "pay as you go" without changing the public API, we can do this any time later. And having to support mouseEnter out of the box is already "baked in", in the sense that it is public API (by being documented) so we can't just ignore it, can we?
I believe that most applications don't use mouseenter / mouseleave / mouseover and always listening to them has non-trivial cost.
Right. I certainly see the benefit of a more smarter approach to handling these events. But again, for now they are covered under Ember's public API. And the cost is already incurring when running w/ jQuery, so fixing it for native mode would just bring the implementation on par, right?
Refactor your component to explicitly add an event listener in didInsertElement
Hm, in what way would that get baked in? If we can change the implementation to be more "pay as you go" without changing the public API, we can do this any time later.
Activity
rwjblue commentedon Apr 30, 2018
I'm somewhat hesitant to bake this in without other changes to event dispatching to make it more "pay as you go". I believe that most applications don't use
mouseenter/mouseleave/mouseoverand always listening to them has non-trivial cost.A couple "simple" (I know, not always simple) work arounds for folks suffering from this right now:
didInsertElement:simonihmig commentedon Apr 30, 2018
Hm, in what way would that get baked in? If we can change the implementation to be more "pay as you go" without changing the public API, we can do this any time later. And having to support
mouseEnterout of the box is already "baked in", in the sense that it is public API (by being documented) so we can't just ignore it, can we?Right. I certainly see the benefit of a more smarter approach to handling these events. But again, for now they are covered under Ember's public API. And the cost is already incurring when running w/ jQuery, so fixing it for native mode would just bring the implementation on par, right?
Yes, we "fixed" it like this for now...
rwjblue commentedon Apr 30, 2018
I’m sold. 😃 Would love a PR...
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery
amk221 commentedon Aug 29, 2018
I'm experiencing some issues with this, here's a demo repo
https://github.com/amk221/-ember-jquery-mouse-events#example
[edit]: Issue: #16922
rwjblue commentedon Aug 30, 2018