-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX beta] support mouseEnter/Leave events w/o jQuery #16603
Conversation
|
||
let parent = this.element; | ||
let outer = this.$('#outer')[0]; | ||
let inner = this.$('#inner')[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inner
is not used
34a2ddf
to
e730fba
Compare
e752fd4
to
18c1dac
Compare
As these events don't bubble, the `EventDispatcher`'s event delegation approach does not work here, when not using jQuery. jQuery has special handling of these events, by listening to `mouseover`/`mouseout` instead and dispatching fake `mouseenter`/`mouseleave` events. This adds similar handling to `EventDispatcher`'s native mode for these events. Fixes emberjs#16591
18c1dac
to
7aa1ae7
Compare
I rebased this today (had conflicts with my own jQuery.Event deprecation changes 😝). This should be green, but I always get some failing test runs due to yarn network timeouts. Already force pushed a few times to rerun the tests... @rwjblue @krisselden would love a review! :) |
restarted those failed builds, will try to do a proper review today. Sorry for the delays... |
No problem, at least it's green now! :) |
will this land in 3.4? or maybe in 3.3? |
@rwjblue ping ;) |
@rwjblue can I help with this? |
event.stopPropagation(); | ||
break; | ||
} | ||
} else if (target.hasAttribute('data-ember-action')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target
can be a text node which does not support hasAttribute method -> http://take.ms/vCrm8C
As these events don't bubble, the
EventDispatcher
's event delegation approach does not work here, when not using jQuery. jQuery has special handling of these events, by listening tomouseover
/mouseout
instead and dispatching fakemouseenter
/mouseleave
events. This adds similar handling toEventDispatcher
's native mode for these events.Fixes #16591