Spectrum with option allowEmpty set to true fires change event on input element when empty color isn't changed.
Simple fix:
// `equals`
// Can be called with any tinycolor input
tinycolor.equals = function (color1, color2) {
+ if (!color1 && !color2) { return true; }
if (!color1 || !color2) { return false; }
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
};
Spectrum with option allowEmpty set to true fires change event on input element when empty color isn't changed.
Simple fix: