diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index d60c09eab..0506bc0e5 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -28,6 +28,11 @@ export default Input.extend({ return `${this.ppfx}input-holder`; }, + remove() { + Input.prototype.remove.apply(this, arguments); + this.colorEl.spectrum('destroy'); + }, + /** * Set value to the model * @param {string} val diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index 6831e9a56..0c4b4e58f 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -9,6 +9,7 @@ export default PropertyIntegerView.extend({ remove() { PropertyIntegerView.prototype.remove.apply(this, arguments); + this.inputInst.remove(); ['inputInst', '$color'].forEach(i => (this[i] = {})); },