I know there was an issue that was raised regarding this, but the applied fix doesn't work for me. (discussed here )
I want the user to be able to clear the value of the input, however it defaults to '#FFF'. How I fixed it was,
(1) The preRender function appears to setup the properties and values to initially load a picker, why its called in the hide method I don't understand ? commenting this out stopped the default values from being applied to the field when the user clicked or tabbed out of the field.
(2) The render(true) property calls the preRender function which as with 1. overwrites the field value. Commenting this out stopped this, furthermore you could remove the on change handler entirely as setColor is applied during preRender and toggle functions.
I know there was an issue that was raised regarding this, but the applied fix doesn't work for me. (discussed here ) I want the user to be able to clear the value of the input, however it defaults to '#FFF'. How I fixed it was,
$(_$UI).hide(_options.animationSpeed, function() { // preRender(false); _colorPicker.$trigger = null; }).off('.tcp');
.on('change.tcp', function() { _color.setColor(this.value || '#FFF'); //_this.colorPicker.render(true); })
(1) The preRender function appears to setup the properties and values to initially load a picker, why its called in the hide method I don't understand ? commenting this out stopped the default values from being applied to the field when the user clicked or tabbed out of the field. (2) The render(true) property calls the preRender function which as with 1. overwrites the field value. Commenting this out stopped this, furthermore you could remove the on change handler entirely as setColor is applied during preRender and toggle functions.