Skip to content

Commit f17524b

Browse files
authored
Fix heatmap colors for Chrome/Safari (#5421)
1 parent eabbddc commit f17524b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

public/js/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2363,8 +2363,13 @@ function initHeatmap(appElementId, heatmapUser, locale) {
23632363
getColor: function(idx) {
23642364
var el = document.createElement('div');
23652365
el.className = 'heatmap-color-' + idx;
2366+
document.body.appendChild(el);
23662367

2367-
return getComputedStyle(el).backgroundColor;
2368+
var color = getComputedStyle(el).backgroundColor;
2369+
2370+
document.body.removeChild(el);
2371+
2372+
return color;
23682373
}
23692374
},
23702375

0 commit comments

Comments
 (0)