Join GitHub today
draggable-points module: error on mouseDown if dragPoint (i.e. chart.hoverPoint) does not exist #10131
dragPoint's members should not try to be accessed if dragPoint does not exist
If the dragPoint is undefined, I get an error because there is no property
Explanation of how this can be achieved
Sadly, I have not produced a demo, but you can see that this will indeed happen in the light of changes made since Highcharts 7.0.2: eb55a74#diff-10a1263170fc907a94f2f1a90814c4c7R2479
Let me explain how this can occur, as it does in our app:
If I move the mouse even the slightest, it seems to update the hoverPoint and I can again happily click or start dragging the point.
However, in a chart where I have much less data, this effect doesn't occur most of the time. Can this be somehow related to how you are adding the point hover events starting from:
I understand this behaviour can be hard to debug without a reproducable demo, but I did my best trying to explain it. If I have more time, I might try to create a mini-demo. But at least you can remove the error from occuring :) For now, I have to revert back to 7.0.2 in order to not get this error.
I'm only using latest chrome
Thank you for reporting about the problem.
The chart destroy and rebuild on point click is not recommended, but if it throws an error then it's a bug.
Live demo: https://jsfiddle.net/BlackLabel/hLqo0p6b/