Skip to content

Commit 08b69fd

Browse files
authored
Allow contextmenu (right click) events to trigger the onClick handler (chartjs#7828)
1 parent 5c0d139 commit 08b69fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/core.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ class Chart {
11331133
// Invoke onHover hook
11341134
callCallback(options.onHover || options.hover.onHover, [e, active, me], me);
11351135

1136-
if (e.type === 'mouseup' || e.type === 'click') {
1136+
if (e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu') {
11371137
if (_isPointInArea(e, me.chartArea)) {
11381138
callCallback(options.onClick, [e, active, me], me);
11391139
}

0 commit comments

Comments
 (0)