-
- Downloads
[FIX] web_editor: do not remove default styles
Previously, when copy-pasting HTML with styles on styleable tags, those
styles could still be removed by the editor if they had a default value.
This was supposed to be a way to keep the DOM clean and lighter.
However, styles with default values still serve a purpose when
overriding non-default values inherited by their parents. Therefore,
removing them was a conceptual mistake.
One example in the editor where this purpose can be served is in
tables where spans can override the style of the cell or parent span.
This commit ensures we no longer remove style attributes because of
their default value.
Task-3332955
closes odoo/odoo#121862
Signed-off-by:
David Monjoie (dmo) <dmo@odoo.com>
Showing
- addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js 3 additions, 13 deletionsaddons/web_editor/static/lib/odoo-editor/src/OdooEditor.js
- addons/web_editor/static/lib/odoo-editor/test/spec/copyPaste.test.js 2 additions, 2 deletions...editor/static/lib/odoo-editor/test/spec/copyPaste.test.js
- addons/web_editor/static/lib/odoo-editor/test/spec/html_tables/excel_result.html 3 additions, 3 deletions...c/lib/odoo-editor/test/spec/html_tables/excel_result.html
- addons/web_editor/static/lib/odoo-editor/test/spec/html_tables/google_result.html 1 addition, 1 deletion.../lib/odoo-editor/test/spec/html_tables/google_result.html
Loading