Highcharts chart click event fired on click of the reset zoom button (bug?)

highcharts

Solution

A dirty way can be to look at the srcElement

for example test the following (check if firstChild not null ...)

event.srcElement.firstChild.data === "Reset zoom"

Problem

I have a click event on the chart, but if you use the zoom and want to reset the zoom, the click event is also fired. I've the following chart settings: ``` $('#container').highcharts({ chart: { type: 'line', marginRight: 130, marginBottom: 25, zoomType: 'x', events: { click: function (event) { alert('chart click!'); } } }... ``` see working example: http://jsfiddle.net/2Y3ah/ Well this looks like a bug or if it's as designed how to block the click event if the reset zoom button is clicked.

Original source