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

Fix onHover event not being triggered #4297

Merged
merged 2 commits into from May 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/core/core.controller.js
Expand Up @@ -808,11 +808,9 @@ module.exports = function(Chart) {
me.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);
}

// On Hover hook
if (hoverOptions.onHover) {
// Need to call with native event here to not break backwards compatibility
hoverOptions.onHover.call(me, e.native, me.active);
}
// Invoke onHover hook
// Need to call with native event here to not break backwards compatibility
helpers.callback(options.onHover || options.hover.onHover, [e.native, me.active], me);

if (e.type === 'mouseup' || e.type === 'click') {
if (options.onClick) {
Expand Down