Fix color palette

This commit is contained in:
Julia Radzhabova 2021-07-11 23:47:42 +03:00
parent 2be31ade1e
commit 779f09b295

View file

@ -166,7 +166,7 @@ define([
updateCustomColors: function() { updateCustomColors: function() {
var el = this.$el || $(this.el); var el = this.$el || $(this.el);
if (el) { if (el) {
var selected = el.find('a.' + this.selectedCls), var selected = (this.lastSelectedIdx>=0) ? $(this.colorItems[this.lastSelectedIdx].el) : el.find('a.' + this.selectedCls),
color = (selected.length>0 && /color-dynamic/.test(selected[0].className)) ? selected.attr('color') : undefined; color = (selected.length>0 && /color-dynamic/.test(selected[0].className)) ? selected.attr('color') : undefined;
if (color) { // custom color was selected if (color) { // custom color was selected
color = color.toUpperCase(); color = color.toUpperCase();