[FIX] web_editor: fix css rules computing everywhere
X-original-commit: bf9928d28818324c85318968a235d238398bca68 Part-of: odoo/odoo#81540
This commit is contained in:
committed by
Antoine Guenet
parent
096c3ab82f
commit
8b1012a79d
@@ -115,6 +115,10 @@ var MassMailingFieldHtml = FieldHtml.extend({
|
||||
this.$content.find('.o_layout').addBack().data('name', 'Mailing');
|
||||
// We don't want to drop snippets directly within the wysiwyg.
|
||||
this.$content.removeClass('o_editable');
|
||||
// Force compute CSS rules even without the style-inline node option.
|
||||
if (this.mode === 'edit' && !this.cssRules) {
|
||||
this.cssRules = convertInline.getCSSRules(this.wysiwyg.getEditable()[0].ownerDocument);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Returns true if the editable area is empty.
|
||||
|
||||
@@ -955,7 +955,9 @@ FieldHtml.include({
|
||||
|
||||
_createWysiwygIntance: function () {
|
||||
return this._super(...arguments).then(() => {
|
||||
this.cssRules = getCSSRules(this.wysiwyg.getEditable()[0].ownerDocument);
|
||||
if (this.nodeOptions['style-inline'] && this.mode === "edit") {
|
||||
this.cssRules = getCSSRules(this.wysiwyg.getEditable()[0].ownerDocument);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user