mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Allow contextmenu (right click) events to trigger the onClick handler (#7828)
This commit is contained in:
parent
5c0d13981c
commit
08b69fd974
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user