[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) <nle@odoo.com>
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user