-
- Downloads
[FIX] web_editor: prevent crash when colorpickers receive split values
Steps to reproduce:
- Edit
- Add a snippet with columns
- Save
- HTML editor
- Set up a border on one column of the snippet with different colors for
the top/right/bottom/left sides
- Edit
- Click on the column => crash
This is only an example, but if a colorpicker widget is linked to a
SnippetOption instance's `selectStyle` method designed to handle the
"border-color" property of an element, the value received can be split
if the item uses different colors for its top/right/bottom/left borders.
For instance, you could receive "red blue" if the item has red top and
bottom borders and blue left and right borders. In that case, the
colorpicker widget code would try to add the class "bg-red blue" on its
preview item which would crash because of the space inside).
After this commit, we simply do not show any color for this case.
opw-2803311
closes odoo/odoo#103654
Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
Loading
Please register or sign in to comment