From 8c142cc864e292f21468fbf8c604bc61d826bdab Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 2 Nov 2017 11:05:11 +0300 Subject: [PATCH] Fix Bug 36224. --- apps/common/main/lib/component/ThemeColorPalette.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/ThemeColorPalette.js b/apps/common/main/lib/component/ThemeColorPalette.js index ec5265ba5..bfdeae7d2 100644 --- a/apps/common/main/lib/component/ThemeColorPalette.js +++ b/apps/common/main/lib/component/ThemeColorPalette.js @@ -148,8 +148,10 @@ define([ if (el) { var selected = el.find('a.' + this.selectedCls), color = (selected.length>0 && /color-dynamic/.test(selected[0].className)) ? selected.attr('color') : undefined; - if (color) color = color.toUpperCase(); - selected.removeClass(this.selectedCls); + if (color) { // custom color was selected + color = color.toUpperCase(); + selected.removeClass(this.selectedCls); + } var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom'); colors = colors ? colors.split(',') : [];