Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip leaves shadows when hovering over points on Safari #18927

Closed
KamilKubik opened this issue May 2, 2023 · 5 comments · Fixed by #18935
Closed

Tooltip leaves shadows when hovering over points on Safari #18927

KamilKubik opened this issue May 2, 2023 · 5 comments · Fixed by #18935

Comments

@KamilKubik
Copy link
Contributor

KamilKubik commented May 2, 2023

Expected behaviour

Tooltip with the split property shouldn't leave shadows when hovering over points.

Actual behaviour

Tooltip with the split property leaves shadows when hovering over points. The more defined points, the clearer it is to see the issue.

Live demo with steps to reproduce

Screenshot 2023-05-02 at 17 57 00

https://jsfiddle.net/BlackLabel/mqe7ko0L/

Product version

Highcharts v11.0.0

Last working version: Highcharts v10.3.3

Affected browser(s)

Safari v16.4

@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation May 2, 2023
@karolkolodziej
Copy link
Contributor

Internal note:
Tested on Safari v15.5 and there was no issue but with Safari v16.4 this issue is visible.
Unable to bisect.

@chrisrodkey
Copy link

I do not get this kind of behavior when I disable the "shadow" property via:

  tooltip: {
        shadow: false
    },

Just my own experience, though. I would prefer to not have to rely on this workaround; I like the shadows!

@TorsteinHonsi
Copy link
Collaborator

Internal note
Some background on the issue. The change in v11 is that we moved away from the old shadow approach which was to generate multiple SVG elements in a stack behind the tooltip, with different opacities. This originates from way back when support for SVG filters was sketchy. With v11, we implement shadows through SVG filters, like we have previously only done with styled mode.

Unfortunately we see the same issue in v10, styled mode: https://jsfiddle.net/ohrnpw0d/1/ .

This issue clearly indicates it is not a bug in the Highcharts logic per se, but rather a rendering issue with SVG in Safari. It can be tricky to work around those, but we can try and see if we can make the browser redraw more of the chart. Interestingly, the issue doesn't appear when the tooltip is not split. Maybe the animation has something to do with it. Split tooltips are not animated by default.

@TorsteinHonsi
Copy link
Collaborator

TorsteinHonsi commented May 4, 2023

Workaround 1

Drop in this snippet to force a redraw of the whole group when moving the tooltips:

// Drop-in fix for https://github.com/highcharts/highcharts/issues/18927
Highcharts.wrap(Highcharts.Tooltip.prototype, 'renderSplit', function(proceed) {
    proceed.apply(this, Array.prototype.slice.call(arguments, 1));

    this.label.attr({
        opacity: this.label.opacity === 1 ? 0.999 : 1
    });
});

View it live on jsFiddle

Workaround 2

The problems seem to be gone when setting outside: true.

    tooltip: {
        shadow: false,
        outside: true
    },

@TorsteinHonsi
Copy link
Collaborator

Reported to WebKit: https://bugs.webkit.org/show_bug.cgi?id=256411

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants