diff options
| author | Samuel Degueldre <sad@odoo.com> | 2020-11-09 13:20:45 +0000 |
|---|---|---|
| committer | Samuel Degueldre <sad@odoo.com> | 2021-01-07 17:45:49 +0000 |
| commit | f23806e1e768e65873ec578e5135a430ade7aa68 (patch) | |
| tree | d9713d535a8d18adef18b4d551b8f4586ae9d29d /doc/python3.rst | |
| parent | 851fe64f7789bb398383c22e3ebbaebb051791f6 (diff) | |
[FIX] web_editor: fix replacing media leaving unexpected elements
Previously, changing a media from a video/icon/document to a different
type would leave empty elements in the DOM, this is because summernote's
range API `range.insertNode` function deletes the content but not the
structure (HTML elements).
This commit fixes that by using jQuery's replaceWith method instead of
summernote's insertNode when a media was found, and only using
summernote in case no media was found (eg. a text range).
Part of: odoo/odoo#60450
X-original-commit: 63f80995a05eeab1061b769c7733a1cfa98c726e
Diffstat (limited to 'doc/python3.rst')
0 files changed, 0 insertions, 0 deletions
