[FIX] web_editor: close text color palettes when opening option ones
When the color palette for the text was open, opening the background color options was not closing it. The click event was stopped at the snippet option level for all events, where it should only be the case if the click was done inside the colorpicker. Part of https://github.com/odoo/odoo/pull/72539 task-2476601 X-original-commit: 888f1bd44d0aa431d3d89ee3c913c6eb64c3d54d
This commit is contained in:
@@ -1494,10 +1494,11 @@ const ColorpickerUserValueWidget = SelectUserValueWidget.extend({
|
||||
*/
|
||||
_onClick: function (ev) {
|
||||
// Do not close the colorpalette on colorpicker click
|
||||
if (!ev.originalEvent.__isColorpickerClick) {
|
||||
this._super(...arguments);
|
||||
if (ev.originalEvent.__isColorpickerClick) {
|
||||
ev.stopPropagation();
|
||||
return;
|
||||
}
|
||||
ev.stopPropagation();
|
||||
return this._super(...arguments);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user