Skip to content

Commit

Permalink
Fixed #18927, shadow of split tooltip left artefacts in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
TorsteinHonsi committed May 4, 2023
1 parent b218395 commit 3ea4b3b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ts/Core/Tooltip.ts
Expand Up @@ -31,7 +31,7 @@ import type TooltipOptions from './TooltipOptions';
import F from './FormatUtilities.js';
const { format } = F;
import H from './Globals.js';
const { doc } = H;
const { doc, isSafari } = H;
import { Palette } from './Color/Palettes.js';
import R from './Renderer/RendererUtilities.js';
const { distribute } = R;
Expand Down Expand Up @@ -1573,6 +1573,18 @@ class Tooltip {
container.style.left = boxExtremes.left + 'px';
container.style.top = chartTop + 'px';
}

// Workaround for #18927, artefacts left by the shadows of split
// tooltips in Safari v16 (2023). Check again with later versions if we
// can remove this.
if (isSafari) {
tooltipLabel.attr({
// Force a redraw of the whole group by chaning the opacity
// slightly
opacity: tooltipLabel.opacity === 1 ? 0.999 : 1
});
}

}

/**
Expand Down

0 comments on commit 3ea4b3b

Please sign in to comment.