Series fade on legend tap with styled chart on mobile (probably extra mouseover event) #7418
Comments
Thank you for reporting this issue. I can see how series fade out/in on Chrome+responsivne, tested also:
|
Hi @pawelfus, 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.) |
I fixed this simply by removing the active class name in the |
Summary
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.
Expected behaviour
Actual behaviour
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
if (hasTouch) return;
and this "solved" the problem. Not sure, if this is appropriate.) A quick search lead me to this: https://stackoverflow.com/q/41625763/1396265, indicating it is a browser bug? (I did not dig any deeper so far)Affected browser(s)
The text was updated successfully, but these errors were encountered: