Files
odoo_source/addons
Rodolpho Lima d8a3374c43 [FIX] web_editor: node insertion from different document
Steps:
- on website or mass_mailing, insert an image via the "/image" command,
- a text node containing "[object HTMLImageElement]" is pasted instead
  of the expected content.

Since [1], when inserting a node, the instanceof operator is used to
compare that node to the Editor's document global `Node` object. While
it fixed cases where there was as mismatch of `Node` objects (nodes
created by the top document x nodes created via the iframe's document),
it revealed errors elsewhere. Notably, the MediaDialog inserts an image
node created by the top document, regardless if the editor is mounted in
an iframe.

This commit makes the `insert` command more permissive when resolving if
'content' is a Node or a string.

task-3543003

[1]: https://github.com/odoo/odoo/commit/bfe0c5fedf172f4c77002a4f54803b376ada43ce

closes odoo/odoo#137872

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-06 14:33:47 +00:00
..
2023-09-27 11:33:01 +00:00
2023-10-05 16:49:01 +00:00
2023-09-11 19:13:59 +00:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-08-17 18:42:46 +02:00
2023-10-06 14:33:43 +00:00
2023-09-27 11:33:01 +00:00
2023-10-06 07:12:11 +00:00
2023-09-27 11:33:01 +00:00
2023-09-27 11:33:01 +00:00
2023-10-06 14:33:43 +00:00
2023-10-06 14:33:43 +00:00
2023-10-05 18:35:30 +00:00
2023-09-27 11:33:01 +00:00
2023-09-27 11:33:01 +00:00
2023-09-27 11:33:01 +00:00
2023-09-27 11:33:01 +00:00