summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_cache/thread_cache.js
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-10-22 10:42:54 +0000
committerqsm-odoo <qsm@odoo.com>2020-11-02 17:03:56 +0000
commitd649232e49a8bca55ba8684a605fd34068138cf6 (patch)
treecab8a0328c5dd3bbff38647e9a7326efa17c7b99 /addons/mail/static/src/models/thread_cache/thread_cache.js
parent0a23a2bb65f6e59e4db545e6736c754c55463b15 (diff)
[FIX] web_editor: DOM is not cleaned before saving custom snippets
Previously, when saving a custom snippet, the outerHTML of the snippet was naively read directly and saved as a new custom snippet. Unfortunately this completely bypasses all cleanup mechanisms that we have before saving, such as stopping the public widgets, or creating attachments for cropped or optimized images. This would result in weird bugs, where public widgets would appear twice when dropping a custom snippet containing one, as well as the creating a new attachment for any image that was optimized or cropped before saving the custom snippet every time it was dropped in the page again. Unfortunately there is no good mechanism for an option to ask the editor to clean the DOM without actually saving it, as a temporary measure, the snippet-save option will instead save the whole page (which will clean up the DOM) and save the custom snippet after the save, before refreshing the page and reopening the editor, not unlike some theme options. task-2341612 closes odoo/odoo#61202 X-original-commit: 2fa955267a3f81495be82c4214abd8befcf1fc95 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread_cache/thread_cache.js')
0 files changed, 0 insertions, 0 deletions