Skip to content

Commit

Permalink
Fix heatmap colors for Chrome/Safari (#5421)
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks authored Nov 28, 2018
1 parent eabbddc commit f17524b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2363,8 +2363,13 @@ function initHeatmap(appElementId, heatmapUser, locale) {
getColor: function(idx) {
var el = document.createElement('div');
el.className = 'heatmap-color-' + idx;
document.body.appendChild(el);

return getComputedStyle(el).backgroundColor;
var color = getComputedStyle(el).backgroundColor;

document.body.removeChild(el);

return color;
}
},

Expand Down

0 comments on commit f17524b

Please sign in to comment.