From decd9968d3fefc6784879fe250e5dd187335627e Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 27 Aug 2019 13:03:22 +0000 Subject: [PATCH] [FIX] web_editor: bg-transparent filter=>no opaque The color picker in snippet options has two way to set a color: have a data-color attribute => it is used, or have a o_custom_color class and the background-color is set directly on that color. In the case where we select no background color (transparent), it would work in preview, but when applied the opaque color of the transparent button (since opacity is not copied) is set which is wrong and unexpected. opw-2053636 closes #36131 Signed-off-by: Nicolas Lempereur (nle) --- addons/web_editor/static/src/js/editor/snippets.options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index f481061c9e2..f4bcb1db855 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -770,7 +770,7 @@ registry.colorpicker = SnippetOption.extend({ if ($selected.length) { if ($selected.data('color')) { this.$target.addClass(this.colorPrefix + $selected.data('color')); - } else { + } else if ($selected.hasClass('o_custom_color')) { this.$target.css('background-color', $selected.css('background-color')); } }