fix(sparklines): tooltip behaviour in safari
This commit fixes an issue that happens when a group of tooltips are rendered in safari: when hovering over the group of charts quickly sometimes tooltips are not hidden.
The root cause for the issue was the usage of debounceByAnimationFrame
for the mouse event that triggered the tooltips. It would create a race condition with the mouseLeave
event of the component.
The solution moves handling of showing the tooltip to the chart instance by leveraging the formatter callback option, instead of using a DOM
event.
before | after |
---|---|
sparkline_tooltips_safari | sparkline_tooltips_safari_after |
Closes #517 (closed)
Edited by David Pisek