Skip to content
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

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

simonihmig
Copy link
Contributor

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 #16591


let parent = this.element;
let outer = this.$('#outer')[0];
let inner = this.$('#inner')[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inner is not used

@simonihmig simonihmig force-pushed the support-mouseenter branch from 34a2ddf to e730fba Compare May 3, 2018 08:09
@rwjblue rwjblue requested review from rwjblue and krisselden May 16, 2018 20:12
@simonihmig simonihmig force-pushed the support-mouseenter branch 3 times, most recently from e752fd4 to 18c1dac Compare June 7, 2018 09:09
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
@simonihmig simonihmig force-pushed the support-mouseenter branch from 18c1dac to 7aa1ae7 Compare June 7, 2018 10:31
@simonihmig
Copy link
Contributor Author

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! :)

@rwjblue
Copy link
Member

rwjblue commented Jun 7, 2018

restarted those failed builds, will try to do a proper review today. Sorry for the delays...

@simonihmig
Copy link
Contributor Author

No problem, at least it's green now! :)

@hakubo
Copy link
Contributor

hakubo commented Jul 2, 2018

will this land in 3.4? or maybe in 3.3?

@simonihmig
Copy link
Contributor Author

@rwjblue ping ;)

@hakubo
Copy link
Contributor

hakubo commented Jul 13, 2018

@rwjblue can I help with this?

@rwjblue rwjblue merged commit 47aa3e4 into emberjs:master Aug 10, 2018
@simonihmig simonihmig deleted the support-mouseenter branch August 10, 2018 17:38
event.stopPropagation();
break;
}
} else if (target.hasAttribute('data-ember-action')) {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants