The "comparisons" website snippet uses a list group with the class set
on a UL. In consequence, the web editor considers it as a regular list
and may try to outdent it, which is not the expected behavior with a
list group. This fix ensures that ULs with the `list-group` class cannot
be in/outdented.
closesodoo/odoo#32709
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
A list item with text can be written as <li>text</li> or as
<li><p>text</p></li>. Issues occurred when both syntaxes need to be
merged together. Namely, the <p>text</p> was being appended to the other
list item, thereby creating a visible new line.
This addresses various bugs that occured with nested lists - including
lists that are nested with a UL within a LI (as opposed to a UL directly
within another UL).
This resolves an issue with pasting in text only mode (no HTML): the
list of nodes to paste was being modified with the `_mergeAdjacentULs`
method which is irrelevant to text nodes. Because of that, a corrupted
list of nodes was inserted into the DOM.
opw-1962743
closesodoo/odoo#32454
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Have a fieldHTML as:
```
<p>
Some text
<br>
<br>
More text
</p>
```
In the Html field widget, place your cursor before the "M"
press Enter to insert a newline
Before this commit "Some text" and the subsequent `<br>` were deleted
This was because the code:
- split the original `<p>` into two
( i.e. it became
```
<p>
Some text
<br>
<br>
</p>
<p>
More text
</p>
```
)
- took the last child of the first p, which is a text then fell back to the first p
- replaced the whole p with <br>
After this commit, the original p is still split, but we append the br to it instead of replacing it
closesodoo/odoo#32777
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
On ENTER in a checklist item, a new checklist item is created. The new
one should never be checked. This ensures that ENTER in a checked
checklist item never creates a checked checklist item but instead cleans
the class.
closesodoo/odoo#32684
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Fixesodoo/odoo#27487
Noto Color Emoji produces an error on wkhtmltopdf, cf
wkhtmltopdf/wkhtmltopdf#4149
In the backend assets, the $font-family-sans-serif is changed in
web/static/src/scss/bootstrap_overridden.scss
In the reports assets, the $font-family-sans-serif was NOT changed in
web_editor/static/src/scss/bootstrap_overridden.scss
The default boostrap fonts were still used in reports, ignoring the changes made
for backend.
closesodoo/odoo#32312
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The recent refactoring odoo/odoo@f296992 wrongly moved the ace editor
style from `web_editor` to `website`, even though ace is in `«eb_editor`.
The editor is also used in Studio (which does not depend on website) so
the style was missing in this case.
Task 1951290
closesodoo/odoo#32384
Signed-off-by: Christophe Matthieu <Gorash@users.noreply.github.com>
The editor has a tooltip editor wizard "Change media description and
tooltip", but when selecting an image there is also a tooltip:
"Double-click to edit"
added by the editor.
The combination of the two break the functionality, eg:
- if a tooltip is set with editor, then selecting the tooltip: we see
the set tooltip and not "Double-click to edit"
- if a tooltip is set with editor, then selecting the image back, then
opening the tooltip editor => the set tooltip is lost
With this changeset, we just do not show "Double-click to edit" tooltip
if there is a tooltip set on the element.
opw-1946801
closes#32482
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In the `getMatchedCSSRule`, the transcoder try to find the real value of
a `text-align: inherit` css rule by ascending the html tree until it
finds a `text-align` with a meaningful value. By default is exits if it
reachs the `<html>` top node but doesn't exit if a call to `.parent()`
exits the dom (the behavior of jquery is to return a dummy element when
calling `.parent()` on an element that has no parent). This lead to an
infinite loop for badly formatted html content.
opw-1951095
closesodoo/odoo#32014
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Following the refactoring of the web_editor (JS & CSS) when adding a
long link in a task's description the line starts to overflow from the
field and create an horizontal scroll.
This commit restores the CSS word-wrap properties to the form field html
allowing to nicely break the line on a word basis, preventing a possible
overflow.
Also it doesn't make sense to apply it on an iframe.
Task ID: 1942179
closesodoo/odoo#31988
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The factor parameter of the mixin in charge of generating the spacing
classes was not correctly used.
closesodoo/odoo#31996
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>