From: Evert Timberg Date: Thu, 1 Oct 2020 12:47:09 +0000 (-0400) Subject: Allow contextmenu (right click) events to trigger the onClick handler (#7828) X-Git-Tag: v3.0.0-beta.3~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08b69fd974666ee583f101206f39161311cfe65a;p=thirdparty%2FChart.js.git Allow contextmenu (right click) events to trigger the onClick handler (#7828) --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 5f0834b87..a4f4be60f 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -1133,7 +1133,7 @@ class Chart { // Invoke onHover hook callCallback(options.onHover || options.hover.onHover, [e, active, me], me); - if (e.type === 'mouseup' || e.type === 'click') { + if (e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu') { if (_isPointInArea(e, me.chartArea)) { callCallback(options.onClick, [e, active, me], me); }