codenamezero
Posts: 22
Joined: Thu Dec 19, 2019 7:23 pm

Has the click behavior changed between 7.2.2 and latest?

In Angular + 7.2.2, when I click on a Point, the event would stop and not propagate all the way to the chart object...
My code logic is that I click on the series Point, then I manually select the Point, the flow is done here.

In React + 9.3.0, when I click on a Point, the event goes all the way through and triggers the click on the chart.
Now with the latest, when I click on the series Point, I still select the Point manually, but then the mouse event continues down and since I bound a `click` event on the chart (such that when user click on the chart, I want to clear the point selection, but I don't want to clear it if CTRL is pressed, this is to prevent accidentally clicking on the chart when the user is trying to select multiple points) it would immediately clears all my Points.


So what do I need to do with 9.3.0? Am I supposed to return `false` always or to manually call event.stopImmediatePropagation? I don't recall seeing Breaking Changes in the changes log between 7.2.2 to latest. :(
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Has the click behavior changed between 7.2.2 and latest?

Hello,

It's hard for me to say if and when the click behaviour was changed.
I would suggest what is written in the API, i.e. I would return 'false' to cancel the action.

API: https://api.highcharts.com/class-refere ... ckFunction
Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”