Mahdi Cheikh Rouhou (macr)
c37b978b03
[FIX] web_editor: save document layout with tabs in different browsers
...
Issue:
======
If you have some tabs in a html_field, opening with a different browser
may cause an issue when saving the document layout.
Steps to reproduce the issue:
=============================
- Open with firefox
- Go to settings , document layout
- Added some `tab` in the footer or any html field
- save
- Open with chrome
- Go to settings , document layout
- click save without doing anything
- error
Origin of the issue:
====================
When calling sanitize in the constructor, the tabs size doesn't change
because we didn't add the class `odoo-editor-editable` which doesn't
make the `editable` dirty since no changes has been made. When calling
save, `cleanForSave` will be called with a clone of the `editable` so in
sanitize it won't matter since the element is not connected to the dom
so again no changes and the edtior still no dirty, after that ,
`onWillUpdateProps` of `Wysiwyg` will be called and we will set the
value of the editor by the new value which will call `resetContent` of
`odooEditor` and it will sanitize the editable but this time it has the
class `odoo-editor-editable` so the finally the sizes of the tabs will
be changed and the editable will become dirty. Now `onWillUnmount` in
`html_field` will be called and since the field is dirty it will commit
changes as a normal save , but a traceback will occur since the
component is already destroyed.
Solution:
=========
Add the class `odoo-edtior-editable` before the call to sanitize to mark
the field as dirty from the start and will be updated with the new sizes
of tabs on the first commit and not in the commit of `onWillUnmount`.
opw-3742423
closes odoo/odoo#156898
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com >
2024-04-24 06:23:02 +00:00
..
2024-04-23 17:09:48 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 11:51:22 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-14 00:09:33 +02:00
2024-04-23 15:32:46 +00:00
2024-02-12 20:24:09 +00:00
2024-04-14 00:09:33 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-16 14:12:46 +00:00
2024-03-31 00:09:16 +01:00
2024-03-24 00:12:07 +01:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-24 00:12:07 +01:00
2024-04-14 00:09:33 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-27 17:45:00 +00:00
2024-04-22 13:39:50 +00:00
2024-04-14 00:09:33 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-07 00:08:33 +02:00
2024-03-24 00:12:07 +01:00
2024-04-14 00:09:33 +02:00
2024-04-11 08:12:56 +00:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-17 00:11:43 +01:00
2024-04-19 09:20:26 +00:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 13:39:53 +00:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-23 09:20:44 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-10 00:13:03 +01:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-16 14:12:53 +00:00
2024-04-09 07:22:43 +00:00
2024-04-09 19:35:41 +00:00
2024-04-18 16:38:24 +00:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-22 11:51:30 +00:00
2024-04-21 00:08:43 +02:00
2024-03-21 18:35:46 +00:00
2024-02-29 20:40:36 +00:00
2024-03-07 11:40:25 +00:00
2024-04-11 16:43:19 +00:00
2024-02-29 20:40:36 +00:00
2024-02-29 20:40:36 +00:00
2024-04-22 11:51:27 +00:00
2024-04-23 17:09:48 +00:00
2024-02-29 20:40:36 +00:00
2024-04-23 17:09:48 +00:00
2024-04-18 11:18:46 +00:00
2024-03-22 03:11:48 +00:00
2024-04-09 23:14:46 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-03-21 11:11:41 +00:00
2024-04-23 17:09:48 +00:00
2024-03-29 10:44:21 +00:00
2024-04-23 17:09:48 +00:00
2024-03-21 23:03:07 +00:00
2024-04-23 13:38:50 +00:00
2024-04-20 01:36:02 +00:00
2024-02-23 13:10:03 +00:00
2024-02-28 08:15:23 +00:00
2024-03-13 09:14:14 +00:00
2024-02-23 13:10:03 +00:00
2024-02-29 20:40:36 +00:00
2024-02-19 12:27:48 +00:00
2024-03-26 13:35:53 +00:00
2024-04-19 14:40:10 +00:00
2024-03-26 22:20:21 +00:00
2024-04-11 15:02:49 +00:00
2024-04-16 07:02:58 +00:00
2024-02-13 20:52:18 +00:00
2024-02-13 20:52:18 +00:00
2024-03-29 15:35:03 +00:00
2024-02-07 18:34:22 +00:00
2024-03-07 15:12:17 +00:00
2024-03-08 11:17:48 +00:00
2024-04-22 13:39:47 +00:00
2024-04-11 15:02:48 +00:00
2024-04-23 17:09:48 +00:00
2024-02-23 13:09:53 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-03-07 05:07:08 +00:00
2024-02-29 20:40:36 +00:00
2024-04-21 18:14:37 +00:00
2024-02-29 20:40:36 +00:00
2024-04-14 09:28:07 +00:00
2024-04-10 20:56:59 +00:00
2024-02-16 02:01:35 +00:00
2024-03-04 08:11:57 +00:00
2024-04-08 11:13:51 +00:00
2024-04-15 09:10:18 +00:00
2024-04-17 22:47:07 +00:00
2024-03-22 09:44:38 +00:00
2024-04-20 17:39:55 +00:00
2024-04-22 08:27:09 +00:00
2024-03-13 14:03:10 +00:00
2024-04-14 21:02:42 +00:00
2024-04-23 17:09:48 +00:00
2024-04-09 15:06:45 +00:00
2024-03-31 00:33:23 +00:00
2024-04-23 17:09:48 +00:00
2024-02-29 20:40:36 +00:00
2024-04-02 12:09:28 +00:00
2024-03-14 08:06:26 +00:00
2024-02-22 09:06:12 +00:00
2024-04-10 11:45:53 +00:00
2024-04-23 17:09:48 +00:00
2024-02-29 20:40:36 +00:00
2024-02-29 20:40:36 +00:00
2024-03-06 14:30:37 +00:00
2024-03-11 16:37:32 +00:00
2024-04-04 08:18:55 +00:00
2024-02-16 08:58:21 +00:00
2024-03-15 17:30:00 +00:00
2024-02-28 19:49:05 +00:00
2024-03-11 10:17:46 +00:00
2024-02-29 20:40:36 +00:00
2024-03-29 07:53:02 +00:00
2024-03-22 14:47:57 +00:00
2024-02-29 20:40:36 +00:00
2024-02-29 20:40:36 +00:00
2024-03-21 23:03:07 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-04-23 17:09:48 +00:00
2024-03-13 14:03:11 +00:00
2024-04-11 08:12:51 +00:00
2024-04-22 11:51:23 +00:00
2024-03-06 14:30:35 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 11:51:24 +00:00
2024-04-21 00:08:43 +02:00
2024-03-11 16:37:34 +00:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-24 00:12:07 +01:00
2024-03-31 00:09:16 +01:00
2024-03-31 00:09:16 +01:00
2024-03-24 00:12:07 +01:00
2024-03-24 00:12:07 +01:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-15 06:12:46 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 17:04:39 +00:00
2024-04-18 07:28:29 +00:00
2024-03-10 00:13:03 +01:00
2024-03-10 00:13:03 +01:00
2024-04-21 00:08:43 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-04-09 11:19:48 +00:00
2024-04-21 00:08:43 +02:00
2024-04-17 13:44:45 +00:00
2024-04-17 22:47:13 +00:00
2024-04-14 00:09:33 +02:00
2024-03-31 00:09:16 +01:00
2024-03-10 00:13:03 +01:00
2024-03-10 00:13:03 +01:00
2024-04-14 00:09:33 +02:00
2024-04-17 22:47:13 +00:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-31 00:09:16 +01:00
2024-03-31 00:09:16 +01:00
2024-03-31 00:09:16 +01:00
2024-03-31 00:09:16 +01:00
2024-04-14 00:09:33 +02:00
2024-03-10 00:13:03 +01:00
2024-04-17 22:47:13 +00:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-23 15:32:54 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-17 00:11:43 +01:00
2024-03-07 08:25:54 +00:00
2024-04-21 00:08:43 +02:00
2024-03-10 00:13:03 +01:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-23 23:18:05 +00:00
2024-04-23 15:32:47 +00:00
2024-03-17 00:11:43 +01:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 17:04:38 +00:00
2024-03-12 16:59:03 +00:00
2024-03-24 00:12:07 +01:00
2024-04-14 00:09:33 +02:00
2024-03-10 00:13:03 +01:00
2024-04-21 00:08:43 +02:00
2024-03-12 16:59:03 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-16 16:18:44 +00:00
2024-03-10 00:13:03 +01:00
2024-04-21 00:08:43 +02:00
2024-04-23 09:20:47 +00:00
2024-04-22 08:27:06 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-22 08:27:10 +00:00
2024-04-22 11:51:22 +00:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-18 07:28:30 +00:00
2024-03-10 00:13:03 +01:00
2024-04-16 10:32:32 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-03-10 00:13:03 +01:00
2024-04-21 00:08:43 +02:00
2024-04-05 12:18:14 +00:00
2024-04-21 00:08:43 +02:00
2024-02-27 17:40:50 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 09:42:54 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-03-17 00:11:43 +01:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-17 00:11:43 +01:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-22 13:39:46 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-23 11:13:12 +00:00
2024-03-22 11:20:04 +00:00
2024-03-28 12:19:04 +00:00
2024-03-13 09:14:09 +00:00
2024-04-17 22:47:19 +00:00
2024-04-17 22:47:19 +00:00
2024-04-17 22:47:19 +00:00
2024-04-17 22:47:19 +00:00
2024-04-07 10:03:48 +00:00
2024-02-19 15:02:20 +00:00
2024-03-29 09:12:17 +00:00
2024-02-26 21:22:46 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-23 15:32:56 +00:00
2024-04-24 06:23:02 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-23 17:09:50 +00:00
2024-04-19 23:49:48 +00:00
2024-04-21 00:08:43 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00
2024-04-07 00:08:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-17 00:11:43 +01:00
2024-04-21 00:08:43 +02:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-03-21 19:54:27 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-10 00:13:03 +01:00
2024-04-22 08:27:05 +00:00
2024-04-23 15:32:52 +00:00
2024-03-31 00:09:16 +01:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-07 00:08:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-14 00:09:33 +02:00
2024-03-17 00:11:43 +01:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-04-22 08:27:11 +00:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-16 14:12:52 +00:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-03-17 00:11:43 +01:00
2024-04-14 00:09:33 +02:00
2024-04-21 00:08:43 +02:00
2024-04-21 00:08:43 +02:00
2024-04-14 00:09:33 +02:00
2024-03-24 00:12:07 +01:00
2024-04-21 00:08:43 +02:00