Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Series fade on legend tap with styled chart on mobile (probably extra mouseover event) #7418
When using the styled Highcharts version on a mobile platform, tapping on the legend items sometimes leads to all series faded out. It looks like an extra mouseover occurs, which triggers the hover behaviour for fading out the chart.
Live demo with steps to reproduce
When adding a log call to this snippet belonging to Interaction.js, one can see mouseover output in the console:
It looks like mouseover events are sometimes generated on mobile platforms in addition to the touch events. (As a quick test, I inserted
I was looking around on how to "fix" this. I noticed, that in the Pointer module in setDOMEvents one could cancel the mouseover if it seems to be related to a touchstart. I did not yet test this in more detail. Something like this:
What do you think about this? Would you already know of any problems this would cause?
I'm not yet sure about the thresholds (need more testing) and I did not yet test it in iOS Safari.
(While testing I noticed, that a very reliable way to reproduce the issue, is to tap right between two legend items.)