-
- Downloads
[FIX] web_editor: update attribute of edition container
In most use case, when we edit the website we have a situation such as:
```
<div id="wrap" branding-attributes="...">
<section class="mycontent">hi!</section>
</div>
```
When we modify a part, we replace all child nodes of the branded
element.
But if we had more complex content such as:
```
<div id="wrap">
<section class="mycontent" branding-attributes="...">ho!</section>
<t t-call-assets="web.assets_common" t-js="false" t-css="false"/>
</div>
```
we have a t-call inside the div#wrap, so branding is distributed to
child that could have attribute modified (eg. changing background).
Then if `<section/>` node is saved, the possibly modified attributes
are lost.
Without the change, the added test fails with:
'<div class="nice">hoi</div>' not found in '...<div>hoi</div>...' :
saved element attributes are saved excluding branding ones
opw-2122947
closes #40345
Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
Loading
Please register or sign in to comment