bgrins / spectrum

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

SelectionPalette flooded while dragging a color #474

Open TheRealBeuf opened 7 years ago

TheRealBeuf commented 7 years ago

While dragging a color the selection palette is constantly updated with the current color, rendering the palette useless (will quickly remove saved colors). This works as expected on the demo pages (only add the color to the selection palette upon choosing the color) but is broken in the distributed code.

Resolved this temporarily without any additional testing in function updateOriginalInput. Added condition to line 866: if(!isDragging) addColorToSelectionPalette(color);