From ec60ba142aae54da0ebfbe70f125932f591c948a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 9 Jan 2019 10:50:27 +0100 Subject: [PATCH] Fixes #3993 Recent changes in color picker has caused incompatibility with existing picker --- .../propertyeditors/colorpicker/colorpicker.controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js index abb26ef4a2..3a6ddc5cfd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js @@ -123,6 +123,11 @@ function ColorPickerController($scope) { if (!$scope.model.value) return false; + // Backwards compatibility, the color used to be stored as a hex value only + if ($scope.model.value.length === 6) { + $scope.model.value = { value: $scope.model.value, label: $scope.model.value }; + } + // Complex color (value and label)? if (!$scope.model.value.hasOwnProperty("value")) return $scope.model.value === color.value;