Before this commit:
When creating a nested checklist within another checklist and subsequently
changing the direction of the parent list, the direction of the parent element
would reverse alongside the pseudo element. However, in the case of nested
checklists, only the content's direction would change, while the pseudo
element's direction remained unaffected.
Afte this commit:
When altering the direction of the parent checklist's content, both the content
itself and the associated pseudo element's direction is changed alongwith the
nested checklist.
task-3461806
closesodoo/odoo#152890
X-original-commit: f46e1f0c5b00f2e289feef5e35f3fea6fb477104
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Since commit [1], which removed jQueryUI for the drag and drop, the
history when editing breaks easily.
Steps to reproduce:
- Drag and drop "Text-Image", save and go back to edit mode.
- Click on a column, move it to the right using the arrow and then to
the left, still with the arrow.
- Undo: no issue, the column went to the right.
- Undo: nothing changed => the column should have gone to the left.
- Undo: the column goes to the left => there should not be a third undo
since we only did two changes.
- Redo: no issue, the column goes to right.
- Redo: nothing changed => the column should have gone to the left.
- Nothing to redo anymore => the column never goes to the left again.
This happens because with the new drag and drop, an `o_draggable` class
is added on the elements when their editor are started, which adds
mutations in the history. Even though it does not explicitely add a
step, these mutations are well reverted when undoing/redoing (e.g. this
is what happens when nothing changes in the steps to reproduce).
This commit fixes this history issue by ignoring the mutations linked to
the `o_draggable` class.
Note that commit [2] already fixed other `o_draggable` class issues.
This commit therefore fixes them in a more general way.
[1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76
[2]: https://github.com/odoo/odoo/commit/32a6729dd094d53eb4a653ebb9d69d2b8cbe2390
task-3698536
closesodoo/odoo#150687
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Before this commit:
While applying font color, when multiple picture snippet is selected the
color was not properly applied to the selection. It was observed that the
font was unintentionally applied around the figure which was preventing the
proper application of selected color.
After this commit:
It has been made sure that whenever the figure element is enountered it
should not be appended inside font tag.
task-3640901
closesodoo/odoo#152660
X-original-commit: 09a9dede95fbcc230a468913d188988cb9ad01e2
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
- Emoji picker opened at an incorrect position.
After this commit:
- The Emoji picker now opens precisely at the cursor location
task-3569967
closesodoo/odoo#152645
X-original-commit: 7fd291355d555af229a33665f472db0811876299
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
- When a banner was inserted at the first line and Ctrl+A and backspace
is performed, nothing happens.
After this commit:
- Now, all the content except banner will be selected and removed.
task-3432167
closesodoo/odoo#151735
X-original-commit: 530f102720458e5e1c224bf38073cd763309bf0a
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
- Performing ctrl+a and backspace inside a banner would unintentionally remove
its first element, which could be a block tag
After this commit:
- Now performing ctrl+a and backspace inside the banner will no longer remove its
first element if it's a block tag.
task-3432167
X-original-commit: ddc8587f8a712fdddaa714bee2931cb149c03a38
Part-of: odoo/odoo#151735
Before this commit:
- Inserting a banner did not set focus inside the banner; instead, focus
was placed after the banner.
After this commit:
- Now, upon creating a banner, focus is now correctly set inside the
banner.
task-3432167
X-original-commit: 7327d20626ec9164f47e00f7094a36b8794db5de
Part-of: odoo/odoo#151735
Before this commit:
- Inserting a banner after already existing content it's impossible to
go to the next line of the banner.
After this commit:
- It's now possible to navigate to the next line of the banner.
task-3432167
X-original-commit: 05a879f81ac59d47b718abbb5966fd4f8214e1de
Part-of: odoo/odoo#151735
Before this commit:
- In the project module, when a user opens the color picker, it opens as
a dropdown even if there is not enough space available, resulting in
some parts of the color picker being inaccessible.
- In the project, when a user opens the color picker a second time, it
always opens as a dropup, even if there is space available for it to
open as a dropdown.
After this commit:
- Now, when a user opens the color picker, it opens as a dropup when
there is not enough space available for the color picker to open as a
dropdown.
- The color picker will open as a dropdown when there is enough space
available.
task-3608803
closesodoo/odoo#152337
X-original-commit: b60aa4f4effcec38d0e18707ce268c0cc07a2515
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
In form views, when the user closes the tab while having unsaved
changes, and if those changes are valid, we want to save them
automatically before leaving.
Before this commit, there could be situations where the changes
weren't actually saved. For instance, if they involved an heavy
payload for the write rpc, or if the network connection was poor,
it might happen that the xhr is killed. Or at least, browsers do
not offer any guarantee to wait for those xhr to reach the server.
Instead of a classical xhr, we thus use navigator.sendBeacon which
ensures that the data will be sent reliably [1]. There's a drawback
though, as its payload is limited. When the payload is too heavy,
sendBeacon simply returns false and does nothing. In this case,
we prevent the page from unloading and display a notification
suggesting the user to manually save his changes before leaving.
[1] https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
Task 3537838
closesodoo/odoo#151834
X-original-commit: 0b53daa60ee5b370def21c8e0e30a6819597a0e4
Related: odoo/enterprise#55457
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit:
When in a checklist where first and second checklist are marked done after
selecting first and second checklist and deleting it the third checklist would
be marked as done.
After this commit:
Deleting previous done checklist would not affect the current checklist.
task-3203889
closesodoo/odoo#152387
X-original-commit: 2ddda7a66076ef99e1aa4ba9d463b0fd2f73626d
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Deependra Solanki (deso) <deso@odoo.com>
Commit that introduced the issue: fbc167bf84340b4bb6d0f8c59f2734814f56c6df
Issue:
======
Adding a table in a long chatter message with scroll raise a traceback
Steps to reproduce the issue:
=============================
- Switch to RTL lang
- Go to any form view and open the editor composer to create a log note
- Write a lot of lines so that the scrollbar appears
- Add a table
- Log the note
- Try to scroll -> traceback
Origin of the issue:
====================
The `_onScroll` method is called and it has `this._rowUiTarget` as the
row from the composer dialog which is not in the ui anymore so
`closestElement(row, 'table')` will return `null`.
Solution:
=========
We just do nothing when the element is not connected.
task-3707808
closesodoo/odoo#151800
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Issue:
======
Discard changes of form having html field doesn't remove the changes
applied in the html field.
Steps to reproduce the issue:
=============================
- Open any mail template
- Add modification on the template
- Click on discard changes
Origin of the issue:
====================
The function `this.props.update` is responsible of updating `_changes`
and updating the record which is called for usual input_field using
`useInputField` hook, but since this html field isn't of the same format
we didn't use it and it's only called in `commitChanges`
Solution:
=========
We update the value of in `_onWysiwygBlur` in case we are `inlineStyle`
so we don't commit but we save the changes for the discard to work
properly.
task-3453497
closesodoo/odoo#151993
X-original-commit: 1624da6f42561792be816836c6d88bc986c3538a
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
Before this commit:
if you have <p> within <li>,sometimes removing the <p> will result in the loss
of all classes.
After this commit:
Replace p inside li with span while preserving classes.
task-3546209
opw-3602047
closesodoo/odoo#152104
X-original-commit: e396a1097463d014a1aba553022451365b31f5f3
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Before this commit:
`destroyLinkTools` function sets the selection to entire link. However, in
case where a website snippet had a structure like
```html
<a>
<div>
<i class=fa-xxx></i>
<div>
<h4>Text</h4>
<font>Text</font>
</div>
</div>
</a>
```
selecting the complete link caused problem. The toolbar couldn't be
updated correctly, also one could not change the a tag of a single element
within the link.
After this commit:
`destroyLinkTools` selects the `anchorNode` and the `focusnode` of the
selection instead of entire link.
task-3245819
closesodoo/odoo#151752
X-original-commit: e88ffecc4bdb0480fc1d47af14558f28f72a665d
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Commit [1] introduces an approach to preserve the cursor in `setTag` when new
node is inserted. It used `setStart` at `firstLeaf` of `startContainer` and used
offset of the `startContainer` similarly for `endContainer` which is incorrect
and would throw traceback regarding no child at that offset.
This commit fix it by getting the correct startContainer and endContainer when
new node is created.
[1]: d04e32c
task-3245819
X-original-commit: d9095d277e4dbfa318ff6ddd2692dbb3c71e4775
Part-of: odoo/odoo#151752
After upgrading (specifically following this [upgrade PR]), when editing
an element, the editor may be tricked into considering that the page
isn't correct even though it is. It causes the "discard" dialog to open.
Steps to reproduce after the [upgrade PR]:
- Remove the CTA in 16.0 with the bin icon (on the button itself, or
from the edit panel, next to the "Block" section).
- Upgrade to 17.0.
- The button is back. Edit the header and click to hide it.
=> a dialog opens "Are you sure you want to discard your changes?".
- Click either "yes" or "cancel".
=> either way, nothing is discarded nor cancelled.
[upgrade PR]: https://github.com/odoo/upgrade/pull/5500
Related to opw-3644220
closesodoo/odoo#151291
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Before this commit:
When pasting using CTRL+SHIFT+V, if the textFragment includes linebreak(\n),
each textFragment is divided, and each seperated fragment is inserted using
`insert` command, followed by `oEnter` command. However, when `oEnter` is
UNBREAKABLE, the inserted text is ROLLBACKED.
After this commit:
We now check whether the anchorNode's closestBlock is UNBREAKABLE. If so use
`oShiftEnter` command; otherwise, use `oEnter` command which avoids ROLLBACK.
task-3563785
closesodoo/odoo#151911
X-original-commit: f1e35ca82cf72ffb21c586d9bf1714bb388fe257
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
When a button is updated, its `btn` classes are stripped by the editor.
However, in so doing the regex replaces `btn_cta` by `_cta`. This commit
fixes it.
Related to opw-3644220
closesodoo/odoo#151803
X-original-commit: 61735c84445606b97fdf95f35b6e3dd1384b7ea5
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit fixes an issue related to the colorpicker component, present
in both back-end and front-end. They use the same XML template but they
have two different selectors within our SCSS files.
Some months ago, commit[1] removed some `@extend` rules related
to button design within the `web_editor`, and replaced them
with a `.btn` BS class. This affected both colorpicker and causes layout
issues on the "front-end web editor", which was not the expected output.
The issue was fixed directly with commit[2], but by removing the `.btn`
class from the template, it removed the whole styling on the back-end
color picker, making it use the user agent button styling.
== After ==
Since the colorpicker already has some CSS variables to handle its design
depending on the context, we make use of the CSS variables to customize
the design of the component when it is inside the backend, and make it
look as it was before it lost its `.btn` class.
[1]: ee38c69503
[2]: 711fc86368
task-3693078
closesodoo/odoo#150157
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Before this commit:
- On table when we hit tab it displays toolbar as it sets selection between
startPosition and endPosition.
- On hitting tab it selects the text in the next cell completely, which
should not happen.
After this commit:
- Now toolbar is not displayed on hitting tab.
- selectionis made to collapse at the end the lastNode of the cell.
task-3475079
closesodoo/odoo#151653
X-original-commit: 9361133a24146528846cd2d69119c3e9045eafba
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
When we have some text in selection and we move away from the selection the
the toolbar disappear.
After this commit:
The toolbar is still visible when we move far from the selected text.
task-3054229
closesodoo/odoo#151354
X-original-commit: cbcad3b85f78dd42f7e059471498009be27a9045
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit, since [1], the "small" class behavior of Bootstrap
was changed to use a fixed value instead of being dependent on the
context (using `em` units).
This was a bad choice, given the fact that the "small" class could
be used in the past with its previous behavior in custo but also in
default Odoo layouts, where it could be use in more legit cases that the
one Odoo currently offers: instead of applying the class to a whole
paragraph, applying it to part of a title.
In that case, since [1], we can have a big title ... with a very small
text next to it, which may be strange. Of course, the proper way to
achieve a big title with a smaller text next to it would be to not use
"small" but another hx font-size, but the legit bootstrap behavior which
is to use their "small" class is thus broken.
This commit keeps the current possibilities (big title with very small
text next to it) but does it by using new custom Odoo classes instead of
changing the Bootstrap "small" one. That way, legit custo in previous
versions (or trying to use default Bootstrap in this version) will be
supported.
Note that this commit will impact existing 17.0 users though: if they
actually configured a big title with small inner text... those will
become big title with slightly smaller inner text (the default Bootstrap
behavior). Worse: a big title whose size was reduced using the font-size
selector and choosing "small" will now become a big title. We think this
is worth the risk (see PR description for more visual details).
However, notice that "legit" use case of the "small" font-size in 17.0
will be kept untouched: e.g. adding a small text on its own or next to
a paragraph: the "smaller" Bootstrap behavior is now computed based on
the ratio of the configured base and small font-sizes.
Note that some additional "bugs" were found investigating this:
- Form descriptions use the "small" class for no reason and should
probably not be possible to customize ("font style"-wise) anyway.
- The use of the "small" *tag* should probably be reviewed in all Odoo
layouts and/or its interaction with the editor be fixed.
[1]: https://github.com/odoo/odoo/commit/194f73a9bbad8c3c3fb5c378e7bdfa704aaacdc0closesodoo/odoo#149590
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Current behaviour before commit:
In a saved pad, putting cursor inside a link without
making any other changes makes editor dirty. As result
discard button appears on the top.
Desired behaviour after commit:
Now putting cursor inside a link without editing
doesn't make editor dirty and discard button doesn't
appear on top.
task-3607361
closesodoo/odoo#151094
X-original-commit: d7f89ca078ec21fe0db49ae5b01f21caecd6abfa
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit the button to add documents from an URL is labeled
"Add Document" which is confusing given it is displayed besides an
"Upload Document" button.
This commit renames the "Add Document" button into "Add URL" to make its
purpose more obvious.
task-3493618
closesodoo/odoo#149406
X-original-commit: 860cbe0fcddc7b7a6f1ca383161ab439ba68fd72
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Before this commit:
Clicking on invalid link results in a blank and bizarre notification because
we are accessing wrong parameter in wysiwyg.js.
After this commit:
After correcting parameters clicking on an invalid link triggers a notification
displaying an invalid URL message.
task-3563345
closesodoo/odoo#139301
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
This commit adds translation capability to custom snippets.
Before this commit, the custom snippet was not translate friendly:
1. Neither when saving a block as custom snippet
2. Neither when dropping a custom snippet into a page.
This was a known limitation for years. But now it's time to make it
work.
Step to reproduce (part 1):
- Enable french
- Drag & drop Title snippet in a page
- Translate the Title
- Save the block as custom snippet
-> Go in the backend view of this custom snippet, in debug, there is no
translation that followed the title.
Step to reproduce (part 2):
- Following previous steps, now add the translation manually on the
custom snippet view
- Back in a page in edit mode, drag & drop this custom snippet in the
page
- Switch to french
-> The title is not translated, the drag & drop copy code but no
translations
Those are the "page/view" to "page/view" translation transfer, but it
could also be any html field (like a product description) to view
(custom snippet) or view (custom snippet) to any html field.
task-3375518
opw-3242100
X-original-commit: 2bd6c1a8d653453692211eef0f5d46a0047eb6f2
Part-of: odoo/odoo#150945
Commit [1] introduced a responsive font size feature was. Following
this, in the context of mass mailing, an issue arises when users select
a font size from the toolbar dropdown. Specifically, the
`_computePxByRem` function converts the `px` value selected by the user
to the wrong `rem` value. This is because it relies on the font size of
the `html` element of the main window's document rather than that of the
iframe's document. Since the iframe's document has a font size of 14px
where the main document has a font size of 16px, the conversion was
faulty. Also, the value was cached on the window object, which is common
to both documents. So this commit moves that cache to the document so
two different values can be stored.
[1]: https://github.com/odoo-dev/odoo/commit/ddf25a16c46bfc3628512aba1390a1e345ec719a
task-3653543
closesodoo/odoo#147685
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Co-authored-by: Vishal Padhiyar <visp@odoo.com>
Co-authored-by: Dieleman Guillaume <gdi@odoo.com>
Before this commit:
On clicking the saame paragraph while emojipicker is open, it doesnot close,
resulting in multiple emojipicker being opened at the same time.
After this commit:
Now onclick away from emojipicker on the same paragraph emojipicker closes.
task-3555717
closesodoo/odoo#151038
X-original-commit: be671cce046a72402d1746917b4b5b8715ba1d41
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Signed-off-by: Sanjay Sharma (shsa) <shsa@odoo.com>
Current behaviour before commit:
In v16.0 and above clear format button was missing from
snippet toolbar.
Desired behaviour after commit:
Now clear format button is getting appeared in snippet
toolbar.
task-3638147
closesodoo/odoo#150620
X-original-commit: 701bbe40554ea9b6867171a755124fe5b635988b
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit, the cropper tool was opened by a closure that spawned the Cropper
tool aside from the editable document.
This was anoying as the editable document can be in an iframe, hence the Cropper would have
been virtually unusable.
This commit factorizes the code in a method to allow overrides. Which is done in
web_studio:ReportEditorWysiwyg.
opw-3484065
closesodoo/odoo#150904
Related: odoo/enterprise#55049
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
To load images in an iframe, the web_editor code expected the iframe to have an src
attribute and built an URL for the image on the basis of that url.
With the srcdoc attribute, there is no need for an src, making the code crash.
After this commit, if an iframe only has srcdoc, we build images' url on the basis of
the main window.
opw-3484065
Part-of: odoo/odoo#150904
Before this commit, the image processing code always added a listener on the load event
of an image before opening the Cropper tool.
If the image was already loaded, the promise did not resolve at all.
After this commit, an image can be already loaded without any Promise not to be resolved.
Part-of: odoo/odoo#150904
Before this commit:
Sometimes applying bulletlist does not produce the expected bullet list
formatting .This issue arises when the selection is on an emptyTextNode(""), and
the traversal of nodes using getTraverseNodes results in the same
emptyTextNode(""). In the toggleList function, we typically remove the
emptyTextNode(""), leaving no appropriate node for creating a bullet list.
After this commit:
Now it will create bullet list because we move the selection to its parent when
it is on an emptyTextNode(""), similar to what we have done with the "BR" element.
task-3547574
closesodoo/odoo#150854
X-original-commit: d5380742b05c64ced7eee92fcf520f208e33819e
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
__Current behavior before commit:__
If `child` is not an `Element` (like a Text or a Comment node), the call
to `querySelectorAll` at the following line will crash.
__Description of the fix:__
End the current loop iteration if `child` is not an `Element` to avoid
calling `querySelectorAll` on it.
__Steps to reproduce the issue on runbot:__
In 15.0:
- Open Email Marketing > Mailings > Create > Second template
- Drag and drop a `Comparisons` block
- Display source code
- Write some text under the `<div class="card ...">`
- Save --> Traceback
In 16.0+:
- Open Email Marketing > Mailings > New > `Start From Scratch`
- Drag and drop an `Event` block
- Replace one of the image (a comment node will be added [here][1])
- Save --> Traceback
opw-3682469
opw-3689181
[1]: https://github.com/odoo/odoo/blob/df1b43a6de5ad15a8fee3713de7d8ec926c61f12/addons/web_editor/static/src/js/backend/convert_inline.js#L715closesodoo/odoo#150752
X-original-commit: 3d1c95d9d143df35320e97abf898f673f4bb1a68
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
Since [1] a margin is applied when another `o_we_user_value_widget`
follows a color palette. Unfortunately this is also applied when the two
elements are not on the same row. Because of this the "Slideout Effect"
option below the "Colors" option of "Footer" looks like it is indented
while it is unrelated to the color selection.
This commit restricts that margin to elements that belong to the a
`we-row`.
[1]: https://github.com/odoo/odoo/commit/2f81c6ae68751d5f93c30aef822730ee04ead391
task-3696870
closesodoo/odoo#150701
X-original-commit: 50c0a5479a11fef0b03bf319283817a94a32cea4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Reproduction:
1. in Note, type ` abcd ` in an empty note
2. color the background of all the text, bold `abcd`
3. select from the end till the letter `b`, try to change the color,
traceback pops up
Fix: The main reason is we remove element in `splitElement`/
`splitAroundUntil`. In this special case, there are two selected nodes
which returns the same font element. The first font element will be
removed and replaced first. Because the first font element doesn’t exist
anymore, when recovering selection, the second element considered as
collapsed and the recovered selection is a caret. Thus the color picker
is gone after applying the color (preview)
The fix is then, we always make sure that the font we have is still
connected to the page (exist in the page), otherwise it’s problematic to
apply color to a non-existing element and recover cursor from it. If
there is font element(s) that is not connected, we simply get the fonts
again, because new font element is created for the second node, it won’t
split (remove) the first node’s font element again
Task-3476494
closesodoo/odoo#150500
X-original-commit: 06a8b930176093e2c5a853b78431316af90f3550
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Co-authored-by: Goaman <nby@odoo.com>
Before this commit:
When a user edits an article and selects the restore button to revert to a
previous version, the displayed time is incorrect because it shows universal
time instead of the user's timezone.
After this commit:
When a user edits an article and utilizes the restore button to revert to a
previous version, the timestamp will now reflect the time in the user's current
timezone.
task-3641579
closesodoo/odoo#149177
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
*website
Steps to reproduce:
- Drop a "Text-Image" snippet on the website.
- Click on a column and hide it on desktop.
- Click on the parent snippet and hide it on desktop.
-> The column is not a child of the parent in the invisible entry.
Since [1], invisible snippets are shown hierarchically in order to
better visualize the "parent-children" relation that could exist between
them. To do so, [1] based its logic on the `.o_snippet_invisible` to
find the invisible elements. However, since [2], a distinction has been
made between elements that are hidden only on desktop, only on mobile or
on both depending on some conditions. The goal of this commit is to take
the new `o_snippet_mobile_invisible` and `o_snippet_desktop_invisible`
classes into account at the creation of the invisible entry.
[1]: https://github.com/odoo/odoo/commit/922d3e63b597b1ef7fbbb5ebb4641a3ad8bdf4ed
[2]: https://github.com/odoo/odoo/commit/3103e0553011b5c1f4078972d7a88fa3fd4068b2
task-3679823
closesodoo/odoo#150512
X-original-commit: c8f247ee5fa178f012b2852cba3d0e9322a2c3a6
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
Before this commit:
-Font styles shows active while selecting cells.
After this commit:
-Font styles should not be active by default.
task-3547652
closesodoo/odoo#150443
X-original-commit: d026f4d7160ec00b6cb27b4cf5b34afc9dbfda13
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
If we entered text within a inline-code block and pressed the backspace key,the
zero-width space (zws) at the end of the inline-code block would be deleted.
Consequently, there was no way to exit the inline-code block.
After this commit:
Users can now navigate out of the inline-code block by using the right or left
arrow keys when inside an inline-code block.
task-3613340
closesodoo/odoo#150453
X-original-commit: 31c73e9dd53fa0f7379d87e9c9970b2788e454cd
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
The method `getValue` of the wysiwyg could have some cleaning on the
value that will always make it different from the original value.
The _isDirty method of the html field will now make the original value
be processed by the wysiwyg `getValue` to be able to compare it
with the current value.
The sanizite call in `OdooEditor.cleanForSave` had the wrong root. As
we are calling `cleanForSave` for an element that is not inside the
editable, the root cannot be `this.editable`.
task-3679122
closesodoo/odoo#148996
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Steps to reproduce:
- Go to website (“Edit” mode) > Add a “Big Boxes” block.
- Switch to “Grid” mode > Select the last column n (while n > 1) and set
a background image on it.
- Try to change the background position > You cannot save or cancel the
changes since the option buttons (“Apply” & “Discard”) are invisible.
This is simply because the grid element was cloned on the background
container (`.o_overlay_background`) with its grid `z-index` style
(with `z-index` === n) which automatically hides the buttons.
The goal of this commit is to fix this behaviour by simply forcing the
`z-index` of the background element to 0.
task-3648466
closesodoo/odoo#150351
X-original-commit: 7dbb25dfeae25f27e10d4052db98c5f9d93699ff
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Current behaviour before commit:
In tablepicker, number of the selected cells (rows X cols)
is not visible at the bottom.
Desired behaviour after commit:
Now, number of the selected cells is visible at the bottom of
tablepicker.
task-3662728
closesodoo/odoo#150243
X-original-commit: 72aae3599c8cd81fc00b2d46a432ee20f7c44b13
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
When pasting text inside the editor, if the text looks like a URL, a
link is implicitly created.
Unfortunately, this also happens when the edited element does not
support HTML.
Because of this, when translating a page, links are created inside the
translated text which does not support HTML.
This commit solves this by pasting the plain text if the target of the
paste does not support HTML (which is the case for translations).
This commit also prevent link creation when typing a space after text
that looks like an URL in targets that do not support HTML.
In saas-16.4, `_handleAutomaticLinkInsertion` is also adapted to prevent
unwanted link creation.
Steps to reproduce for first scenario:
- Add French to your website.
- Edit your master English Home page.
- Drop a Text snippet in the Home page.
- Save the Home page.
- Switch to French.
- Translate the page.
- From an external text input, copy `http://odoo.com` in your clipboard.
- Put the cursor inside the Text snippet's text.
- Paste.
=> A link was created.
Steps to reproduce for second scenario:
- Add French to your website.
- Edit your master English Home page.
- Drop a Text snippet in the Home page.
- Save the Home page.
- Switch to French.
- Translate the page.
- Put the cursor inside the Text snippet's text.
- Type `http://odoo.com` followed by a space.
=> A link was created.
opw-3546308
closesodoo/odoo#150189
X-original-commit: de351e500559166963fd2e748229d5c1d901aa44
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Before this commit:
Attempting to delete a selected table row does not result in the removal of the
row in Firefox.
After this commit:
Now deleting a selected table row results in removal of the row in FIrefox.
task-3610789
closesodoo/odoo#150167
X-original-commit: 5dd99a02fc3cce99969e696b5cf428afaa27ba78
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Issue:
=====
Users with IOS can't sign with safari.
Steps to reproduce the issue:
=============================
- Install sign
- Make sure you have a template which has at least one signature sign
item.
- Share the document and open the link with ios on safari in v 15.4+
(browserstack) for example.
- Go to the signature sign item and use auto and click sign or sign all
- Nothing will happen.
Origin of the issue:
====================
https://github.com/niklasvh/html2canvas/issues/2864
Solution:
=========
https://github.com/niklasvh/html2canvas/issues/2864#issuecomment-1111044861
opw-3660682
closesodoo/odoo#149903
X-original-commit: f11723f406f2af95090bdd13e9acb30c89014638
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit addresses an issue where the text selection would disappear from
editor when clicking on the font size option from the toolbar.
Modifications:
- The issue of text selection disappearing when interacting with the font size
dropdown has been fixed.
- A new toolbar option, `customFontSize`, has been added. This option is
exclusively enabled for editor that have a toolbar in the same document.
The `readonly` attribute has been added to the input field to make it read-only
in our scenario, providing dropdown functionality for font size in the editor.
However, the functionality remains unchanged for the website.
task-3500827
closesodoo/odoo#142808
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Typing a valid http URL + SPACE transforms the URL into a link (anchor
element).
[1] broke such URL transformation if the URL is followed by punctuation
characters, e.g. "somelink.com...".
After this commit, typing "somelink.com..." + SPACE transforms
"somelink.com" into a link, restoring the behavior prior to [1].
task-3602890
[1]: https://github.com/odoo/odoo/commit/4da0608f7c7cd7a6550ec40535b9562fb35c5417closesodoo/odoo#147845
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Commit [1] added the support for images with a link set on them in grid
mode.
As a follow up, this commit does the following:
- Removes the `!important` from the grid image anchor CSS rules, as they
were not really needed.
- Checks if the image has a closest `o_grid_item_image` column instead
of checking the parent in the `GridImage` options. Indeed, this class
already guarantees that the image is well a grid image; we can therefore
simplify the code.
It also removes a comment that was forgotten in commit [2].
[1]: https://github.com/odoo/odoo/commit/085d70cea571ea80c141ac6005e8bd8333bd269f
[2]: https://github.com/odoo/odoo/commit/d8c374e3e6b31bf88aa42952aadf3379936f7600
related to opw-3580128
closesodoo/odoo#149681
X-original-commit: 9244e85ebb9e1605292698fe31ad94da7709ab86
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>