bgrins / spectrum

The No Hassle JavaScript Colorpicker
https://bgrins.github.io/spectrum/
MIT License
2.32k stars 588 forks source link

Colors stack in the palette #563

Open knutsbyviktor opened 4 years ago

knutsbyviktor commented 4 years ago

Version 1.8.0 Downloaded locally and provided via Wro4J

The palette stacks the colors on top of eachother. After inspecting the palette I could see that the spans for the palette was nested into one another. See attached images

Faulty rendering

Faulty html

I unmified the source code and found that a </span> is missing from function paletteTemplate(p, color, className, opts) (row 119). After modifying that row like this: html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span></span>');

The desired output was obtained.

Correct rendering

``

johnd0e commented 4 years ago

Duplicate of #558, already fixed in master.